We already blog a lot on temporary tables on disk, how this could
be bad for your workload and should be avoid. Each
temporary table will open a file descriptor, external
kernel call and by nature a well know file system slow
operation.
We can point this benchmark simulating a working mail
server
Monitoring of such queries can be trace via the status of
created_tmp_disk_tables
Evidence of what is happening watching many Aria or MyISAM tables
created on disk :
/usr/sbin/lsof | grep "mysql" | grep "#"
mysqld 1855 mysql 1658u
REG
8,1 8192 1505932 …
The latest from the MySQL community
Ideas, releases, practical guides, and perspectives from the people building with MySQL.
In my previous post, I’ve showed how to use Dtrace to find queries creating disk temporary tables (only available for OS with dtrace: solaris, freebsd, etc).
In MySQL 5.6 (which is not released yet, use “labs” version for now) we can use new performance_schema table events_statements_history or events_statements_history_long to find all performance metrics for all queries including created disk/memory tables, use of index, etc. WOW! This is what I have been waiting for a long time!
To illustrate, I have grabbed mysql-5.6.3-labs-performance-schema-linux2.6-x86_64.tar.gz from labs.mysql.com (this feature is only in labs version) and run sysbench readonly test (you need to disable prepared statements in sysbench, seems to be not working with …
[Read more]