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.
|
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. |
|||
|
|
|
Look into enabling the Query Log and the Slow Query Log. |
|||
|
|
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. |
||||
|
|
|
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. |
|||
|
|
|
Here is an good article about the profiler of MySQL. Although take a look at the explain statement. |
||||
|
You can also check out MySQLTuner |
||||
|
|
|
I use this little script. It's always been useful to me, although not anything official. |
|||
|
|
|
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. |
|||
|
|
|
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
|
|||
|
|