本节介绍基于表达式的内存使用顾问程序。
逻辑 I/O 比物理 I/O 快很多倍,因此 DBA 应该努力将物理 I/O 保持在最低限度。逻辑 I/O 确实不是免费的,DBA 应该努力将所有 I/O 保持在最低限度,但最好是在内存中执行大部分数据访问。使用 InnoDB 时,大部分数据访问应该发生在内存中,因此 InnoDB buffer cache 的命中率应该很高。
默认频率00:05:00
默认自动关闭是否启用
此顾问不会针对 MySQL 8 或更高版本进行评估。
When enabled, the query cache should experience a high degree of
hits, meaning that queries in the cache are being reused by
other user connections. A low hit rate may indicate not enough
memory is allocated to the cache, identical queries are not
being issued repeatedly to the server, or that the statements in
the query cache are invalidated too frequently by
INSERT
, UPDATE
, or
DELETE
statements.
This advisor triggers when more than 25% of the Query Cache is being used, and the ratio of Query Cache hits to Query Cache inserts is low.
Default frequency 00:05:00
Default auto-close enabled no
This advisor does not evaluate against MySQL 8, or higher.
When the Query Cache is full, and needs to add more queries to the cache, it makes more room in the cache by freeing the least recently used queries from the cache, and then inserting the new queries. If this is happening often, increase the size of the cache to avoid this swapping.
Default frequency 00:05:00
Default auto-close enabled no
MySQL is multi-threaded, so there may be many clients issuing queries for a given table simultaneously. To minimize the problem of multiple client threads having different states on the same table, the table is opened independently by each concurrent thread.
The table cache is used to cache file descriptors for open
tables and there is a single cache shared by all clients.
Increasing the size of the table cache allows mysqld to keep
more tables open simultaneously by reducing the number of file
open and close operations that must be done. If the value of
Open_tables
is approaching the
value of table_open_cache
, this
may indicate performance problems.
Default frequency 00:05:00
Default auto-close enabled no