gpt4 book ai didi

mysqltuner - 需要临时表的排序

转载 作者:行者123 更新时间:2023-11-30 00:23:21 25 4
gpt4 key购买 nike

我是 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)

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

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

感谢任何帮助。

谢谢

最佳答案

检查内存中临时表的限制,确保此时不会将表写入磁盘。

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

关于mysqltuner - 需要临时表的排序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23060516/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com