0

I recently started noticing that a large sum of my tmp tables of my MySQL is being created on my Disk rather then in the memory.

TEMP TABLES
Current max_heap_table_size = 128 M
Current tmp_table_size = 128 M
Of 73993 temp tables, 46% were created on disk
Perhaps you should increase your tmp_table_size and/or max_heap_table_size
to reduce the number of disk-based temporary tables
Note! BLOB and TEXT columns are not allow in memory tables.
If you are using these columns raising these values might not impact your
ratio of on disk temp tables.

How can I optimize this so that it uses memory rather then the disk since it would be faster.

Chirag
  • 271
  • 1
  • 4
  • 11

1 Answers1

2

The text you printed tells you what you need to do:

Perhaps you should increase your tmp_table_size and/or max_heap_table_size to reduce the number of disk-based temporary tables

http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_tmp_table_size http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_heap_table_size

devicenull
  • 5,622
  • 1
  • 26
  • 31