Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Are there any open source MySQL performance tools to help optimize SQL queries?

share|improve this question
explain <query>. – jordanm Apr 4 '13 at 4:19

I think you should look at these blogs.


share|improve this answer
You have been around long enough to know not to just post links... – jasonwryan Apr 4 '13 at 6:46
@jasonwryan: Sorry for that. – pradeepchhetri Apr 4 '13 at 6:47

To profile a mysql command you could use SHOW PROFILE

mysql> SET profiling = 1;
mysql> [type your query here]

and to get more information about what mysql would do in order to get your desired result, you could use EXPLAIN.

mysql> EXPLAIN [type your query here]

Good starting points for optimizations are the usage of indices and the increase of memory usage in my.cnf (the default parameters could be very low). If you delete a lot of data in a table OPTIMIZE TABLE could also be helpful.


In any case you should use the output of SHOW PROFILE to determine which parts need a lot of time and are worth to be optimized.

Be aware to switch of the query cache while optimizing. You would trick yourself otherwise.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.