Information Schema PARTITIONS Table
The Information Schema PARTITIONS
contains information about table partitions, 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 , LIST , HASH , LINEAR HASH , KEY or LINEAR KEY . |
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 or ALTER TABLE statement. |
SUBPARTITION_EXPRESSION |
Expression used to create the subpartition by the CREATE TABLE or 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 . 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 . |
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.
© 2021 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/information-schema-partitions-table/