两天前在我的服务器上我的tmp_table_size= max_heap_table_size(16M)。
我做了一个每小时运行一次的 cron 作业,并从 : created_tmp_disk_tables, created_tmp_files,开始生成报告created_tmp_tables
在我的报告中:created_tmp_disk_tables+ created_tmp_files+ created_tmp_tables=我的临时数据的 100%
接着就,随即 :
- 与
tmp_table_size=max_heap_table_size=16M报告向我展示了下一个平均报告:- 27.37% (created_tmp_disk_tables)
- 1.16% (created_tmp_files)
- 71.48% (created_tmp_tables)
如何优化这些结果?
与
tmp_table_size=max_heap_table_size=20M在第一个小时:- 23.48% (created_tmp_disk_tables)
- 32.44% (created_tmp_files)
- 44.07% (created_tmp_tables)
7 小时后(从重启开始):
- 21.70% (created_tmp_disk_tables)
- 33.75% (created_tmp_files)
- 44.55% (created_tmp_tables)
这不是我所期望的。
- 磁盘表从 减少
27.37%到21.70%-> 预期更多 - 临时文件上升
1.16%到33.75%-> 为什么? - 内存表从减少
71.48%到44.55%-> 奇怪;预计会上涨