Назад | Перейти на главную страницу

Временные таблицы MySQL, создаваемые на диске

Недавно я начал замечать, что большая часть моих таблиц tmp MySQL создается на моем диске, а не в памяти.

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.

Как я могу оптимизировать это, чтобы он использовал память, а не диск, поскольку это было бы быстрее.

Напечатанный текст говорит вам, что вам нужно сделать:

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