Profiling Queries with SHOW STATUS
mysql> flush status;
mysql> select SQL_NO_CACHE count(*) from table;
– Check query plan now:
mysql> show status like 'Select%';
– Check engine operations:
mysql> show status like 'Handler%';
– Check if there was any ordering:
mysql> show status like 'Sort%';
– Check how many temporary tables have been created:
mysql> show status like 'Created%';