朋友找我帮忙看下数据库,说想对一些查询做些优化。
说是临时表创建比较多,但不知道是具体哪些查询出现问题。
想问下有没有办法仅记录出使用某种方式的查询这种功能or工具,遂来请教一下。谢谢
tuning-primer.sh:
TEMP TABLES
Current max_heap_table_size = 256 M
Current tmp_table_size = 256 M
Of 62452 temp tables, 36% 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.
mysqltuner.pl:
[!!] Temporary tables created on disk: 57% (35K on disk / 62K total)
临时表存储在/dev/shm上,没有慢查询目前,就是看着上面的数据有些不爽。。。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.