MariaDB starting with 5.5.31

The QUERY_CACHE_INFO table was introduced as part of the QUERY_CACHE_INFO plugin in MariaDB 5.5.31.

Description

The table is not a standard Information Schema table, and is a MariaDB extension.

The QUERY_CACHE_INFO table is created by the QUERY_CACHE_INFO plugin, and allows you to see the contents of the query cache. It creates a table in the INFORMATION_SCHEMA database that shows all queries that are in the cache. You must have the PROCESS privilege (see GRANT) to use this table.

It contains the following columns:

ColumnDescription
STATEMENT_SCHEMADatabase used when query was included
STATEMENT_TEXTQuery text
RESULT_BLOCKS_COUNTNumber of result blocks
RESULT_BLOCKS_SIZESize in bytes of result blocks
RESULT_BLOCKS_SIZE_USEDSize in bytes of used blocks

For example:

SELECT * FROM information_schema.query_cache_info;
+------------------+-----------------+---------------------+--------------------+-------------------------+
| STATEMENT_SCHEMA | STATEMENT_TEXT  | RESULT_BLOCKS_COUNT | RESULT_BLOCKS_SIZE | RESULT_BLOCKS_SIZE_USED |
+------------------+-----------------+---------------------+--------------------+-------------------------+
...
| test             | SELECT * FROM a |                   1 |                512 |                     143 |
| test             | select * FROM a |                   1 |                512 |                     143 |
...
+------------------+-----------------+---------------------+--------------------+-------------------------

The QUERY_CACHE_INFO table will be removed in a future release, and replaced by the QUERY_CACHE_QUERIES table (see MDEV-4682).

Comments

Comments loading...