Simple Machines Community Forum

General Community => Scripting Help => Topic started by: Grudge on July 15, 2004, 07:52:03 AM

Title: Useful article on optimising index's on MySQL
Post by: Grudge on July 15, 2004, 07:52:03 AM
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.
Title: Re: Useful article on optimising index's on MySQL
Post by: Vinoth on July 15, 2004, 10:21:58 AM
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.
Title: Re: Useful article on optimising index's on MySQL
Post by: Grudge on July 15, 2004, 02:17:40 PM
I learnt them move from modding YaBBSE in conjuction with the manual on php.net - never owned a book on either :)
Title: Re: Useful article on optimising index's on MySQL
Post by: Dunrobin on July 15, 2004, 03:48:07 PM
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.)
Title: Re: Useful article on optimising index's on MySQL
Post by: Vinoth 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
Title: Re: Useful article on optimising index's on MySQL
Post by: Peter Duggan on July 15, 2004, 04:09:22 PM
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/

/me is sick of subjective opinions about chalk and cheese!
Title: Re: Useful article on optimising index's on MySQL
Post by: Vinoth on July 15, 2004, 04:16:56 PM
Funny answer, but the truth cannot be hidden,

Title: Re: Useful article on optimising index's on MySQL
Post by: Peter Duggan on July 15, 2004, 04:26:18 PM
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'?
Title: Re: Useful article on optimising index's on MySQL
Post by: Vinoth 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/
Title: Re: Useful article on optimising index's on MySQL
Post by: reznorsoft on July 16, 2004, 05:37:07 AM
Amen  :P
Title: Re: Useful article on optimising index's on MySQL
Post by: Chris Cromer on July 16, 2004, 08:26:32 AM
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;
Title: Re: Useful article on optimising index's on MySQL
Post by: Christian Land on July 16, 2004, 09:14:15 AM
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.
Title: Re: Useful article on optimising index's on MySQL
Post by: [Unknown] on July 16, 2004, 11:02:40 AM
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]
Title: Re: Useful article on optimising index's on MySQL
Post by: Vinoth on July 16, 2004, 03:01:21 PM
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/
Title: Re: Useful article on optimising index's on MySQL
Post by: Curbow 5 on July 16, 2004, 06:27:14 PM
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
Title: Re: Useful article on optimising index's on MySQL
Post by: Chris Cromer on July 16, 2004, 11:26:52 PM
@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.
Title: Re: Useful article on optimising index's on MySQL
Post by: Vinoth on July 17, 2004, 04:53:11 AM
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.