News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Useful article on optimising index's on MySQL

Started by Grudge, July 15, 2004, 07:52:03 AM

Previous topic - Next topic

Grudge

I was just doing some reading on index's in MySQL and came accross this little article:

http://www.databasejournal.com/features/mysql/article.php/1382791

Don't know if it's of interest to anyone but I thought it was quite easy to read and understand and gave some good examples for those relatively new to this.
I'm only a half geek really...

Vinoth

although i donot use mysql, but i wanna learn it/

can u say me where can i learn PHP AND MYSQL/

i am good at ASP and MS SQL.
Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

Grudge

I learnt them move from modding YaBBSE in conjuction with the manual on php.net - never owned a book on either :)
I'm only a half geek really...

Dunrobin

QuoteI learnt them move from modding YaBBSE in conjuction with the manual on php.net - never owned a book on either

Same here, only it's SMF that's inspired me to learn PHP.  (I had been using ASP with MySQL until now.  PHP is much better.)
"Quiet, knumbskulls!  I'm broadcastin'!"

The Three Stooges Online Filmography

Vinoth

ASP And Sql server is best than PHP and My Sql/

You can intergate .net with sql Server and you have a lot of options/

i donot say php has lesser value, php is developing and hope it would find an way like M$ / which produced .net  etc
Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

Peter Duggan

Quote from: Dunrobin on July 15, 2004, 03:48:07 PM
PHP is much better.

Quote from: SpecHackers on July 15, 2004, 04:01:45 PM
ASP And Sql server is best than PHP and My Sql/

* Peter Duggan is sick of subjective opinions about chalk and cheese!

Vinoth

Funny answer, but the truth cannot be hidden,

Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

Peter Duggan

Quote from: SpecHackers on July 15, 2004, 04:16:56 PM
Funny answer, but the truth cannot be hidden,

What's funny about it and what 'truth' are you talking about?

If you want to run kiddies' rides at the beach, a donkey is better than a race horse, but you'd be better off with the race horse for the Derby. What's more, a Clydesdale is better than either for policing a football match, so who can say which is 'best'?

Vinoth

everything is best, so it is left to into hands of ours , what to use and what we develop/

i only say that php is little far behind then ASP/

ASP , .NET , SQL SERVER are powerfull than PHP and MY SQL.

Using .NET you can develop programs very easily, meant user interface,everything inbuilt  but in PHP you have to code code code............

for smaller or bigger programs/
Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

reznorsoft


Chris Cromer

Well this has got me thinking about my indexes a little bit, which is better for speed?

CREATE TABLE prefix_mark_read (
  log_time int(10) unsigned NOT NULL default '0',
  userid int(10) unsigned NOT NULL default '0',
  board int(10) unsigned NOT NULL default '0',
  topic int(10) unsigned NOT NULL default '0',
  mark_read int(10) unsigned NOT NULL default '0',
  KEY userid (userid,board,topic)
) TYPE=MyISAM;

or
CREATE TABLE prefix_mark_read (
  log_time int(10) unsigned NOT NULL default '0',
  userid int(10) unsigned NOT NULL default '0',
  board int(10) unsigned NOT NULL default '0',
  topic int(10) unsigned NOT NULL default '0',
  mark_read int(10) unsigned NOT NULL default '0',
  KEY userid (userid),
  KEY board (board),
  KEY topic (topic)
) TYPE=MyISAM;
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

Christian Land

Quote from: SpecHackers on July 15, 2004, 04:44:39 PM
everything is best, so it is left to into hands of ours , what to use and what we develop/

i only say that php is little far behind then ASP/

ASP , .NET , SQL SERVER are powerfull than PHP and MY SQL.

Using .NET you can develop programs very easily, meant user interface,everything inbuilt  but in PHP you have to code code code............

for smaller or bigger programs/

Do me a favour, OK? Before talking bull******, go and learn what you are talking about.... ASP is nothing more than a piece of crap (ASP is totally outdated and PHP is lightyears ahead of it - what you probably mean is ASP.NET, which is something totally different than ASP)

And .NET itself is nothing more than a FRAMEWORK - so comparing it to PHP is simply stupid! The same goes for comparing SQL-Server with MySQL. Both systems have totally different "development-histories" and were developed with totally different targets in mind...

For the rest -> read Peters posting again.

[Unknown]

#12
Quote from: SpecHackers on July 15, 2004, 04:01:45 PM
ASP And Sql server is best than PHP and My Sql/

You can intergate .net with sql Server and you have a lot of options/

i donot say php has lesser value, php is developing and hope it would find an way like M$ / which produced .net  etc

I'm going to agree with SnowCrash and Peter Duggan, but with the added importance that *I work in an office with ASP.NET (C#) and SQL Server* and I could lay out many of the differences and design flaws ASP.NET and SQL Server have.  Not saying PHP and MySQL are perfect, but I think they have less of these design flaws.

And, while ASP.NET can be compiled, I have experienced that it compiles several times slower than PHP parses.  Even after compilation, it seems as if it is not as fast as it should be, if it really is compiled.  This is one of the few things ASP.NET has over PHP, though, and as I just said it really isn't big at all.

PHP 5, to my understanding, is meant more to be able to be "optimized" or "compiled" properly.  If it were, it would probably be much faster than ASP.NET at both compiling and running after compiled (again, from my experience) so I guess that shoves that down the drain.

Anyhow, to the topic:

I prefer the MySQL documentation on the EXPAIN statement to this tutorial, personally.

-[Unknown]

Vinoth

left to developers to decide which one/

everyones point of view is different, you all guys work on php and my sql so you feel it as better,

Unfinished Bussiness/
Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

Curbow 5

Quote from: bostasp on July 15, 2004, 05:16:34 PM
Neither are better, both have their advantages and disadvantages, and are better at different things. As with most things.

yeah! so what if kicks my ass when it comes to PHP, I'm better at... other... stuff...  :-X

Chris Cromer

@SpecHackers: Are you even reading all the posts? [Unknown] works with both mssql/asp.net, and php/mysql. So he has seen both ends and can say which is better for what. ;)

And I myself have used mssql, and I don't think it's as good as mysql especially for the stuff I use it for.
Chris Cromer

"I was here, here I was, was I here, sure I was" - The little voice in my head.

Vinoth

Cool down guys, 

no conflicts b/n us, i share my thoughts here.

so both are best and it is left in developers hand that what they can develop using that.

Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

Advertisement: