我必须提高数据库性能,但我做不到,有人知道帮帮我吗? 我需要解决,因为最近它很慢,我不能这样继续下去。 如果您需要更多信息,请告诉我
谢谢
-------- 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.
答案 0 :(得分:0)
在列上添加适当的索引应解决问题的一半。