When you have a non-trivial database installation, you will inevitably sooner or later encounter performance related issues ranging from a query not executing as fast as desirable to complete meltdowns where the database does not respond at all.
Until MySQL 5.5 the tools available to investigate what is going on inside MySQL were somewhat limited. Some of the tools were:
- The slow and general query logs
- The status counters available through SHOW [SESSION|GLOBAL] STATUS
- Storage engine status, e.g. SHOW ENGINE INNODB STATUS
- The EXPLAIN command to investigate the query plan of a SELECT statement
- SHOW PROFILE to profile one or more queries
- The MySQL error log
All of these tools are very useful, but also have their limitations, for example the SHOW STATUS mainly consists of counters that does not provide much insight into what is happening …
[Read more]