SHOW-PARTITIONS
SHOW-PARTITIONSβ
Nameβ
SHOW PARTITIONS
Descriptionβ
This statement is used to display partition information
grammar:
SHOW [TEMPORARY] PARTITIONS FROM [db_name.]table_name [WHERE] [ORDER BY] [LIMIT];
illustrate:
- Support the filtering of PartitionId, PartitionName, State, Buckets, ReplicationNum, LastConsistencyCheckTime and other columns
- TEMPORARY specifies to list temporary partitions
Exampleβ
- Display all non-temporary partition information of the specified table under the specified db
SHOW PARTITIONS FROM example_db.table_name;
-
Display all temporary partition information of the specified table under the specified db
SHOW TEMPORARY PARTITIONS FROM example_db.table_name;
-
Display the information of the specified non-temporary partition of the specified table under the specified db
SHOW PARTITIONS FROM example_db.table_name WHERE PartitionName = "p1";
-
Display the latest non-temporary partition information of the specified table under the specified db
SHOW PARTITIONS FROM example_db.table_name ORDER BY PartitionId DESC LIMIT 1;
Keywordsβ
SHOW, PARTITIONS