The QUERY_CACHE_QUERIES
table will be introduced in a future version of MariaDB. See MDEV-4682
The QUERY_CACHE_QUERIES
table will be introduced as part of a future change to the QUERY_CACHE_INFO
plugin, and allows you to see the contents of the query cache. It replaces the QUERY_CACHE_INFO
table.
The table is not a standard Information Schema table, and is a MariaDB extension.
It contains the following columns:
Column | Description |
---|---|
QUERY_CACHE_ID |
Cache entry id (only for qc_info plugin, internally server use a hash table) |
STATEMENT_SCHEMA |
Schema used when query was included |
STATEMENT_TEXT |
Query text |
RESULT_FOUND_ROWS |
|
QUERY_ROWS |
|
SELECT_ROWS_READ |
|
QUERY_HITS |
Query cache hits in this entry |
QUERY_HITS_PERIOD_LOW |
Period between hits that is faster than executing the query without query cache (a good hit rate have many hits here), removing this query entry will consume more time than returning value from query cache |
QUERY_HITS_PERIOD_HIGH |
Period between hits that is slower than executing the query without query cache and is 10 times faster than executing the query without query cache, but isn't slow than 1 second, removing this query will not give problems to users but will increase disk i/o - in future version "10 times" should be replaced to number of competitors trying to include the same query +1 |
QUERY_HITS_PERIOD_OUTLIERS |
Period between hits that is higher than is not HIGH or LOW
|
QUERY_HITS_TOTAL_TIME_US |
Total time expend with query cache |
QUERY_HITS_MEAN_PERIOD_US |
Mean query cache period between hits |
QUERY_HITS_MEAN_PERIOD_LOW_US |
Mean query cache period between LOW hits |
QUERY_HITS_MEAN_PERIOD_HIGH_US |
Mean query cache period between HIGH hits |
QUERY_INSERT_TIME |
Time that query was inserted at query cache |
QUERY_LAST_HIT_TIME |
Last time the query was hit at query cache |
SELECT_EXPEND_TIME_US |
Query expend time |
SELECT_LOCK_TIME_US |
Query lock expend time |
TABLES_TYPE |
Internal use, possible values: NON TRANSACT , NO CACHE , ASK TRANSACT , TRANSACT , "UNKNOWN %u" where %u is a value of the TABLE_TYPE column in the QUERY_CACHE_TABLES
|
RESULT_LENGTH |
Length of result |
RESULT_BLOCKS_COUNT |
Number of result blocks |
RESULT_BLOCKS_SIZE |
Size of result blocks |
RESULT_BLOCKS_SIZE_USED |
Size of used blocks |
FLAGS_CLIENT_LONG_FLAG |
Connection flag (part of query cache hash) |
FLAGS_CLIENT_PROTOCOL_41 |
Connection flag (part of query cache hash) |
FLAGS_PROTOCOL_TYPE |
Connection flag (part of query cache hash) |
FLAGS_MORE_RESULTS_EXISTS |
Connection flag (part of query cache hash) |
FLAGS_IN_TRANS |
Connection flag (part of query cache hash) |
FLAGS_AUTOCOMMIT |
Connection flag (part of query cache hash) |
FLAGS_PKT_NR |
Connection flag (part of query cache hash) |
FLAGS_CHARACTER_SET_CLIENT |
Connection flag (part of query cache hash) |
FLAGS_CHARACTER_SET_RESULTS |
Connection flag (part of query cache hash) |
FLAGS_COLLATION_CONNECTION |
Connection flag (part of query cache hash) |
FLAGS_LIMIT |
Connection flag (part of query cache hash) |
FLAGS_TIME_ZONE |
Connection flag (part of query cache hash) |
FLAGS_SQL_MODE |
Connection flag (part of query cache hash) |
FLAGS_MAX_SORT_LENGTH |
Connection flag (part of query cache hash) |
FLAGS_GROUP_CONCAT_MAX_LEN |
Connection flag (part of query cache hash) |
FLAGS_DIV_PRECISION_INCREMENT |
Connection flag (part of query cache hash) |
FLAGS_DEFAULT_WEEK_FORMAT |
Connection flag (part of query cache hash) |
FLAGS_LC_TIME_NAMES |
Connection flag (part of query cache hash) |
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/information-schema-query_cache_queries-table/