gpt4 book ai didi

mysql - 通过性能指标提高mysql数据库性能

转载 作者:行者123 更新时间:2023-11-30 22:16:52 24 4
gpt4 key购买 nike

我必须提高数据库性能,但我做不到,有人知道可以帮助我吗?我需要解决,因为最近它非常慢,我无法继续这种方式。如果您需要更多信息,请告诉我

谢谢

-------- Performance Metrics -------------------------------------------------
[--] Up for: 1d 12h 31m 21s (174M q [1K qps], 357K conn, TX: 1706B, RX: 23B)
[--] Reads / Writes: 36% / 64%
[--] Binary logging is disabled
[--] Total buffers: 34.1G global + 56.2M per thread (350 max threads)
[OK] Maximum reached memory usage: 47.3G (75.17% of installed RAM)
[OK] Maximum possible memory usage: 53.4G (84.87% of installed RAM)
[OK] Slow queries: 0% (593/174M)
[OK] Highest usage of available connections: 68% (239/350)
[OK] Aborted connections: 0.13% (465/357547)
[OK] Query cache efficiency: 70.6% (79M cached / 112M selects)
[!!] Query cache prunes per day: 194481
[OK] Sorts requiring temporary tables: 0% (72 temp sorts / 105K sorts)
[!!] Joins performed without indexes: 6417
[OK] Temporary tables created on disk: 1% (7K on disk / 727K total)
[OK] Thread cache hit rate: 99% (242 created / 357K connections)
[OK] Table cache hit rate: 98% (2K open / 2K opened)
[OK] Open file limit used: 0% (330/819K)
[OK] Table locks acquired immediately: 99% (99M immediate / 99M locks)

-------- MyISAM Metrics ------------------------------------------------------
[!!] Key buffer used: 18.3% (24M used / 134M cache)
[OK] Key buffer size / total MyISAM indexes: 128.0M/343.0K
[OK] Read Key buffer hit rate: 100.0% (290K cached / 42 reads)
[!!] Write Key buffer hit rate: 42.0% (128K cached / 74K writes)

-------- InnoDB Metrics ------------------------------------------------------
[--] InnoDB is enabled.
[!!] InnoDB buffer pool / data size: 32.0G/95.3G
[OK] InnoDB buffer pool instances: 32
[OK] InnoDB Used buffer: 100.00% (2097127 used/ 2097136 total)
[OK] InnoDB Read buffer efficiency: 99.99% (61258009301 hits/ 61262710249 total)
[!!] InnoDB Write buffer efficiency: 0.00% (0 hits/ 1 total)
[OK] InnoDB log waits: 0.00% (0 waits / 53278760 writes)

-------- ThreadPool Metrics --------------------------------------------------
[--] ThreadPool stat is disabled.

-------- AriaDB Metrics ------------------------------------------------------
[--] AriaDB is disabled.

-------- TokuDB Metrics ------------------------------------------------------
[--] TokuDB is disabled.

-------- Galera Metrics ------------------------------------------------------
[--] Galera is disabled.

-------- Replication Metrics -------------------------------------------------
[--] No replication slave(s) for this server.
[--] This is a standalone server..

-------- Recommendations -----------------------------------------------------
General recommendations:
Run OPTIMIZE TABLE to defragment tables for better performance
Restrict Host for user@% to user@SpecificDNSorIp
Enable the slow query log to troubleshoot bad queries
Increasing the query_cache size over 128M may reduce performance
Adjust your join queries to always utilize indexes
Variables to adjust:
query_cache_size (> 1G) [see warning above]
join_buffer_size (> 32.0M, or always use indexes with joins)
innodb_buffer_pool_size (>= 95G) if possible.

最佳答案

在列上添加适当的索引应该可以解决一半的问题。

关于mysql - 通过性能指标提高mysql数据库性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37964981/

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