views:

70

answers:

2

Hello,

I am new to sql query optimization and i would like to know if there is anyone can suggest a profiling and optimization tool that i can use.

I am trying to optimize queries running on mysql.

Thanks for any help.

+1  A: 

Well, the first thing one should do is have MySQL describe your queries through the DESC command. This will allow you to see a detailed execution plan for the query. You should especially be interested in the columns describing what keys are used, as proper key usage can help a lot.

The way to describe a query is to simply prefix it with the DESC keyword. As an example: DESC SELECT * FROM user WHERE name = 'foo';

ErikSchierboom
+1  A: 

Learn to use and understand EXPLAIN command. Turn on slow query log and log query not using an index

Yada