background preloader

MySql tmp tables

Facebook Twitter

1 Reference Manual :: 7.5.10 How MySQL Uses Int. Sundry MySQL Scripts and Docs. MySQLTuner. Bugs: #26300: Description of Created_tmp_tables / Created_tmp_di. MySQL Performance: MySQL => Created_tmp_disk_tables. Optimising MySql. Finding what Created_tmp_disk_tables with log_slow_filter | MySQ. September 22, 2008 by Ewen Fortune3 Comments 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. <span style="color: #38acec;">log_slow_filter=name</span> Log only the queries that followed certain execution plan. So now all I had to do was set the filter to “tmp_table_on_disk,filesort_on_disk” and I would get only those which use on-disk temporary storage for intermediate results. SET GLOBAL log_slow_filter:=""; Re: Too Big Created_tmp_disk_tables percent.