Title: MySQL query cache stats
Author: Moris Papasmadov
Published: <strong>2020 年 9 月 23 日</strong>
Last modified: 2025 年 12 月 2 日

---

搜索插件

![](https://ps.w.org/mysql-query-cache-stats/assets/banner-772x250.png?rev=2982519)

![](https://ps.w.org/mysql-query-cache-stats/assets/icon-256x256.png?rev=2403328)

# MySQL query cache stats

 作者：[Moris Papasmadov](https://profiles.wordpress.org/morisdov/)

[下载](https://downloads.wordpress.org/plugin/mysql-query-cache-stats.zip)

 * [详情](https://cn.wordpress.org/plugins/mysql-query-cache-stats/#description)
 * [评价](https://cn.wordpress.org/plugins/mysql-query-cache-stats/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/mysql-query-cache-stats/#developers)

 [支持](https://wordpress.org/support/plugin/mysql-query-cache-stats/)

## 描述

Admin dashboard widget measuring and monitoring MySQL / MariaDB [query cache](https://mariadb.com/resources/blog/flexible-mariadb-server-query-cache)
performance & statistics – to optimize sizing configuration and highlight bottlenecks.

#### Why

Database Query for [Options Autoload](https://kinsta.com/knowledgebase/wp-options-autoloaded-data/#what-is-the-wp_options-table)
is repeatedly executed for each WP page load and its poor performance has been identified
as a good indicator for a poorly performing database resulting in slow site.

#### How

 * Use dashboard widget to measure and monitor `Options Autoload Query Time`
 * Use dashboard widget to measure and monitor `Options Autoload Query Size`
    This
   query result size increases constantly over time, as WP site usage grows – but
   its oversized sudden growth or constant balooning must not be overlooked.

Heavy plugins might rely heavily on adding data to `Options Autoload Query Size`.

Poorly written plugins causing WP performance degradation have been found to constantly
increase this query result size.

#### Time Metrics

‘Options Autoload Query Time’ is measured in milliseconds (ms)

0 ms – great performance below one millisecond
 1-2 ms – good performance 3-5 ms–
OK performance 50+ ms – poor performance should be investigated

#### Size Metrics

‘Options Autoload Size’ is measured in Bytes
 If you have the control to enable 
the database server wide query cache – configure query_cache_limit to be larger 
than `Options Autoload Size`

20,000 Bytes – freshly installed clean wordpress site
 30,000 Bytes – small wordpress
site 50,000 Bytes – medium wordpress site 250,000 Bytes – large wordpress site 2,000,000
+ Bytes – too large should be investigated ( `all above are rough metrics` )

## 屏幕截图

 * [[
 * Active query cache stats
 * [[
 * Disabled query cache stats
 * [[
 * Execute database command RESET QUERY CACHE

## 常见问题

### This plugin improves page load performance ?

No, This plugin in itself does not improve performance by being installed, this 
plugin only measures time and size of database query.

### This plugin improves database performance ?

No, This plugin in itself does not improve performance by being installed, an administrator
should use the dashboard widget to measure, monitor and identify problems.

### Must database query cache be enabled ?

No, This plugin measures time and size of a very important database query and these
measurements should be valuable to an administrator whether database query cache
is enabled or not.

## 评价

此插件暂无评价。

## 贡献者及开发者

「MySQL query cache stats」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Moris Papasmadov ](https://profiles.wordpress.org/morisdov/)

[帮助将「MySQL query cache stats」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/mysql-query-cache-stats)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/mysql-query-cache-stats/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/mysql-query-cache-stats/)，或通过
[RSS](https://plugins.trac.wordpress.org/log/mysql-query-cache-stats/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/mysql-query-cache-stats/)。

## 更新日志

#### 1.0.4

 * Added wp_options Autoload Query Time

#### 1.0.3

 * Added wp_options Autoload Size

#### 1.0.2

 * Added Database Size
 * Added Refresh button

#### 1.0.1

 * Added Questions, removed Queries
    Query cache does not cache statements executed
   within stored programs. Queries differs from Questions in that it also counts
   statements executed within stored programs. Questions differs from Queries in
   that it doesn’t count statements executed within stored programs.
 * Added widget button RESET QUERY CACHE
    Execute database command RESET QUERY CACHE.

#### 1.0

 * First release

## 额外信息

 *  版本 **1.0.4**
 *  最后更新：**6 月前**
 *  活跃安装数量 **40+**
 *  WordPress 版本 ** 3.6 或更高版本 **
 *  已测试的最高版本为 **6.9.4**
 *  PHP 版本 ** 5.6 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/mysql-query-cache-stats/)
 * 标签
 * [database](https://cn.wordpress.org/plugins/tags/database/)[mariadb](https://cn.wordpress.org/plugins/tags/mariadb/)
   [performance](https://cn.wordpress.org/plugins/tags/performance/)[tuning](https://cn.wordpress.org/plugins/tags/tuning/)
   [wp_options](https://cn.wordpress.org/plugins/tags/wp_options/)
 *  [高级视图](https://cn.wordpress.org/plugins/mysql-query-cache-stats/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/mysql-query-cache-stats/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/mysql-query-cache-stats/reviews/)

## 贡献者

 *   [ Moris Papasmadov ](https://profiles.wordpress.org/morisdov/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/mysql-query-cache-stats/)

## 捐助

您愿意支持这个插件的发展吗?

 [ 捐助此插件 ](http://www.childrensheartlink.org/donate)