gpt4 book ai didi

通过 Query_Cache 调整 MySQL 和性能

转载 作者:行者123 更新时间:2023-11-29 14:19:47 26 4
gpt4 key购买 nike

我的服务器上的 CMS (WordPress) 性能缓慢。

我运行了SHOW STATUS LIKE 'Qcache%';

结果:

Variable_name               Value
Qcache_free_blocks 0
Qcache_free_memory 0
Qcache_hits 0
Qcache_inserts 0
Qcache_lowmem_prunes 0
Qcache_not_cached 0
Qcache_queries_in_cache 0
Qcache_total_blocks 0

我认为零值不好。有谁知道这些值是否合适?如果不是,您对如何提高网站相对于 MySQL 的性能有什么建议吗?

谢谢。

已修改

在运行上述命令之前,我运行了SHOW VARIABLES LIKE 'have_query_cache';

结果:

Variable_name       Value
have_query_cache YES

修正案#2

然后我运行SHOW VARIABLES LIKE 'query_cache%';

结果:

Variable_name                   Value
query_cache_limit 1048576
query_cache_min_res_unit 4096
query_cache_size 0
query_cache_type ON
query_cache_wlock_invalidate OFF

修正案#3

然后我运行SHOW VARIABLES LIKE 'log_slow_queries';

结果:

Variable_name       Value
log_slow_queries OFF

最佳答案

这些值表明查询缓存未处于事件状态。请参阅http://dev.mysql.com/doc/refman/5.1/en/query-cache-configuration.html

关于通过 Query_Cache 调整 MySQL 和性能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11940903/

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