# Information Schema PARTITIONS Table

The [Information Schema](https://mariadb.com/docs/server/reference/system-tables/information-schema) `PARTITIONS` contains information about [table partitions](https://mariadb.com/docs/server/server-usage/partitioning-tables/partitioning-overview), 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](https://mariadb.com/docs/server/server-usage/partitioning-tables/partitioning-types/range-partitioning-type), [LIST](https://mariadb.com/docs/server/server-usage/partitioning-tables/partitioning-types/list-partitioning-type), [HASH](https://mariadb.com/docs/server/server-usage/partitioning-tables/partitioning-types/hash-partitioning-type), [LINEAR HASH](https://mariadb.com/docs/server/server-usage/partitioning-tables/partitioning-types/linear-hash-partitioning-type), [KEY](https://mariadb.com/docs/server/server-usage/partitioning-tables/partitioning-types/key-partitioning-type) or [LINEAR KEY](https://mariadb.com/docs/server/server-usage/partitioning-tables/partitioning-types/linear-key-partitioning-type). |
| 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](https://mariadb.com/docs/server/server-usage/tables/create-table) or [ALTER TABLE](https://mariadb.com/docs/server/reference/sql-statements/data-definition/alter/alter-table) statement.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| SUBPARTITION\_EXPRESSION        | Expression used to create the subpartition by the [CREATE TABLE](https://mariadb.com/docs/server/server-usage/tables/create-table) or [ALTER TABLE](https://mariadb.com/docs/server/reference/sql-statements/data-definition/alter/alter-table) 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" %}
