# Information Schema PARTITIONS Table

The [Information Schema](/docs/server/reference/system-tables/information-schema.md) `PARTITIONS` contains information about [table partitions](/docs/server/server-usage/partitioning-tables/partitioning-overview.md), with each record corresponding to a single partition or subpartition of a partitioned table. Each non-partitioned table also has a record in the `PARTITIONS` table, but most of the values are `NULL`.

It contains the following columns:

| Column                          | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TABLE\_CATALOG                  | Always def.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| TABLE\_SCHEMA                   | Database name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| TABLE\_NAME                     | Table name containing the partition.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| PARTITION\_NAME                 | Partition name.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| SUBPARTITION\_NAME              | Subpartition name, or NULL if not a subpartition.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| PARTITION\_ORDINAL\_POSITION    | Order of the partition starting from 1.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| SUBPARTITION\_ORDINAL\_POSITION | Order of the subpartition starting from 1.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| PARTITION\_METHOD               | The partitioning type; one of [RANGE](/docs/server/server-usage/partitioning-tables/partitioning-types/range-partitioning-type.md), [LIST](/docs/server/server-usage/partitioning-tables/partitioning-types/list-partitioning-type.md), [HASH](/docs/server/server-usage/partitioning-tables/partitioning-types/hash-partitioning-type.md), [LINEAR HASH](/docs/server/server-usage/partitioning-tables/partitioning-types/linear-hash-partitioning-type.md), [KEY](/docs/server/server-usage/partitioning-tables/partitioning-types/key-partitioning-type.md) or [LINEAR KEY](/docs/server/server-usage/partitioning-tables/partitioning-types/linear-key-partitioning-type.md). |
| SUBPARTITION\_METHOD            | Subpartition type; one of HASH, LINEAR HASH, KEY or LINEAR KEY, or NULL if not a subpartition.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| PARTITION\_EXPRESSION           | Expression used to create the partition by the [CREATE TABLE](/docs/server/server-usage/tables/create-table.md) or [ALTER TABLE](/docs/server/reference/sql-statements/data-definition/alter/alter-table.md) statement.                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| SUBPARTITION\_EXPRESSION        | Expression used to create the subpartition by the [CREATE TABLE](/docs/server/server-usage/tables/create-table.md) or [ALTER TABLE](/docs/server/reference/sql-statements/data-definition/alter/alter-table.md) statement, or NULL if not a subpartition.                                                                                                                                                                                                                                                                                                                                                                                                                         |
| PARTITION\_DESCRIPTION          | For a RANGE partition, contains either MAXINTEGER or an integer, as set in the VALUES LESS THAN clause. For a LIST partition, contains a comma-separated list of integers, as set in the VALUES IN. For a SYSTEM\_TIME INTERVAL partition, shows a defined upper boundary timestamp for historical values (the last history partition can contain values above the upper boundary). NULL if another type of partition.                                                                                                                                                                                                                                                            |
| TABLE\_ROWS                     | Number of rows in the table (may be an estimate for some storage engines).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| AVG\_ROW\_LENGTH                | Average row length, that is DATA\_LENGTH divided by TABLE\_ROWS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| DATA\_LENGTH                    | Total number of bytes stored in all rows of the partition.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| MAX\_DATA\_LENGTH               | Maximum bytes that could be stored in the partition.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| INDEX\_LENGTH                   | Size in bytes of the partition index file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| DATA\_FREE                      | Unused bytes allocated to the partition.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| CREATE\_TIME                    | Time the partition was created                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| UPDATE\_TIME                    | Time the partition was last modified.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| CHECK\_TIME                     | Time the partition was last checked, or NULL for storage engines that don't record this information.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| CHECKSUM                        | Checksum value, or NULL if none.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| PARTITION\_COMMENT              | Partition comment, truncated to 80 characters, or an empty string if no comment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| NODEGROUP                       | Node group, only used for MySQL Cluster, defaults to 0.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| TABLESPACE\_NAME                | Always default.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |

<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-partitions-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.
