Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

What tools exist to profile MySQL, like how MSSQL 2000+ does with the SQL Profiler?

I'd want to trace things like SQL statements executed, execution times, execution plan, etc.

share|improve this question

8 Answers

up vote 9 down vote accepted

Look into enabling the Query Log and the Slow Query Log.

share|improve this answer
+1 for Look into enabling the Query Log and the Slow Query Log. I just don't have the reputation to vote that up just yet ;) – azure_ardee Jan 28 '11 at 1:15

if you have query logging turned on on your production/test environment [ which is not necessary the case ] you can use mk-query-digest from maatkit toolkit. it'll help you to determine which queries are most frequent/longest taking etc.

share|improve this answer

Another commercial option is MySQL Query Analyzer which is part of the MySQL Enterprise Monitor. I've found it to be moderately useful in helping to profile oddball queries to figure out ways to improve their performance.

share|improve this answer

Here is an good article about the profiler of MySQL. Although take a look at the explain statement.

share|improve this answer
1  
This link no longer works. Thanks Oracle. – Mufasa Nov 18 '11 at 20:47
updated to an alternative – Node Nov 28 '11 at 12:51

You can also check out MySQLTuner

share|improve this answer

I use this little script. It's always been useful to me, although not anything official.

http://genomewiki.ucsc.edu/index.php/Tuning-primer.sh

share|improve this answer

I've used several scripts and other tools which are all great, but i found Jet Profiler really good at giving real time monitoring and visualization of what's going on and how things are changing. The full version costs money but the restricted free version is also useful and gives you a good feel for what the full one can do.

share|improve this answer

SQLyog-MySQL GUI has Query Profiler feature which does exactly as you have mentioned, It helps in finding out exact time spent in each step of a query execution enter image description here

share|improve this answer

Your Answer

 
discard

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.