0

我是stackoverflow的新手,所以这是我的第一枪:)

我的 Mysql 数据库有问题。我遇到了一些性能问题,所以我决定使用 mysqltuner。结果是

[--] Up for: 7m 42s (7K q [16.452 qps], 78 conn, TX: 927K, RX: 2M)
[--] Reads / Writes: 86% / 14%
[--] Total buffers: 2.1G global + 1.1M per thread (151 max threads)
[OK] Maximum possible memory usage: 2.3G (24% of installed RAM)
[OK] Slow queries: 0% (16/7K)
[OK] Highest usage of available connections: 2% (4/151)
[OK] Key buffer size / total MyISAM indexes: 1.0G/834.4M
[OK] Key buffer hit rate: 99.1% (8M cached / 79K reads)
[!!] Query cache efficiency: 0.0% (0 cached / 4K selects)
[OK] Query cache prunes per day: 0
[!!] Sorts requiring temporary tables: 376% (2K temp sorts / 675 sorts)
[OK] Temporary tables created on disk: 0% (13 on disk / 7K total)
[OK] Thread cache hit rate: 94% (4 created / 78 connections)
[OK] Table cache hit rate: 26% (102 open / 384 opened)
[OK] Open file limit used: 1% (63/5K)
[OK] Table locks acquired immediately: 100% (13K immediate / 13K locks)

显然,我创建了太多临时表。

但是,这是什么意思?该问题是由于缺少索引还是其他原因引起的?

我很感激任何帮助。

谢谢

4

1 回答 1

0

检查内存中临时表的限制,以确保该点没有将表写入磁盘。

https://www.percona.com/blog/2007/01/19/tmp_table_size-and-max_heap_table_size/

于 2015-08-24T09:52:55.603 回答