Whilst working with a client recently I noticed a large number of temporary tables being created on disk.
show global status like 'Created_tmp%'
| Created_tmp_disk_tables | 91970 |
| Created_tmp_files | 19624 |
| Created_tmp_tables | 1617031 |
Looking at a 60 second sample showed there was a steady flow of queries creating disk based tables.
mysqladmin ext -ri60
| Created_tmp_disk_tables | 74 |
| Created_tmp_files | 3 |
| Created_tmp_tables | 357 |
Luckily this client was running the Percona patched version of MySQL.
The microslow patch adds a very useful feature, the ability to log queries by execution plan.
log_slow_filter=name
Log only the queries that followed …
[Read more]