# Information Schema KEY\_CACHES Table

The [Information Schema](/docs/server/reference/system-tables/information-schema.md) `KEY_CACHES` table shows statistics about the [segmented key cache](/docs/server/ha-and-performance/optimization-and-tuning/system-variables/segmented-key-cache.md).

It contains the following columns:

| Column Name      | Description                                                                                                                     |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| KEY\_CACHE\_NAME | The name of the key cache                                                                                                       |
| SEGMENTS         | total number of segments (set to NULL for regular key caches)                                                                   |
| SEGMENT\_NUMBER  | segment number (set to NULL for any regular key caches and for rows containing aggregation statistics for segmented key caches) |
| FULL\_SIZE       | memory for cache buffers/auxiliary structures                                                                                   |
| BLOCK\_SIZE      | size of the blocks                                                                                                              |
| USED\_BLOCKS     | number of currently used blocks                                                                                                 |
| UNUSED\_BLOCKS   | number of currently unused blocks                                                                                               |
| DIRTY\_BLOCKS    | number of currently dirty blocks                                                                                                |
| READ\_REQUESTS   | number of read requests                                                                                                         |
| READS            | number of actual reads from files into buffers                                                                                  |
| WRITE\_REQUESTS  | number of write requests                                                                                                        |
| WRITES           | number of actual writes from buffers into files                                                                                 |

## Example

```sql
SELECT * FROM information_schema.KEY_CACHES \G
********************** 1. row **********************
KEY_CACHE_NAME: default
SEGMENTS: NULL
SEGMENT_NUMBER: NULL
     FULL_SIZE: 134217728
    BLOCK_SIZE: 1024
   USED_BLOCKS: 36
 UNUSED_BLOCKS: 107146
  DIRTY_BLOCKS: 0
 READ_REQUESTS: 40305
         READS: 21
WRITE_REQUESTS: 19239
        WRITES: 358
```

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-key_caches-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
