?

Log in

No account? Create an account
entries friends calendar profile My Website Previous Previous Next Next
Weird situation, tuning a MySQL db and query, what creates tmp files? - Mark Atwood
fallenpegasus
fallenpegasus
Weird situation, tuning a MySQL db and query, what creates tmp files?
I'm trying to figure out for a friend what results in something like this

Restart the MySQL server and then run the query once. Then check the status variables.

Created_tmp_disk_tables = 0
Created_tmp_files = 362
Created_tmp_tables = 2
Sort_scan = 0
Sort_merge_passes = 0

What could be creating all those tmp files? It's not sorting on disk....

Tags:

2 comments or Leave a comment
Comments
arjen_lentz From: arjen_lentz Date: January 27th, 2009 02:14 am (UTC) (Link)

more info needed...

Might be handy to see the query.

Also, you can just do SHOW SESSION STATUS to see the counters within a connection rather than the global cumulative.
awfief From: awfief Date: January 27th, 2009 02:48 am (UTC) (Link)
Replication. USD $10 says that this is a slave server.

If the query was larger than MIN(tmp_table_size,max_heap_table_size), it would sort on disk and increase the Created_tmp_disk_tables variable, not Created_tmp_files.
2 comments or Leave a comment