SET profiling = 1;
SETprofiling_history_size = 100; -- maximum is 100
SHOW PROFILES; -- shows a list of recent commands
SHOW PROFILE; -- shows a very detailed breakdown of time spent on each database task
For example, if a lot of time is spent 'Sending data', try improving your indexes.http://dev.mysql.com/doc/refman/5.0/en/show-profiles.html
A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.
Jump to
Profiling MySQL
Labels:
benchmark,
bottleneck,
debugging,
mysql,
profiling