Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Usage specification recommendations
INFORMATION_SCHEMA.PARTITION_POLICIES is used to query PARTITION POLICY rules in the system. INFORMATION_SCHEMA.PARITTION_POLICIES and INFORMATION_SCHEMA.PARTITION_POLICY_PARTITIONS form the definition of PARTITION POLICY rules, similar to INFORMATION_SCHEMA.TABLES and INFORMATION_SCHEMA.PARTITIONS.Field Name | Type | Description |
ID | BIGINT UNSIGNED | Each PARTITION POLICY has a unique ID. |
NAME | VARCHAR(64) | Each PARTITION POLICY has a unique NAME. |
PARTITION_TYPE | ENUM | Partition type, supports the following HASH: Partitions data based on the hash-function results of given columns. KEY_51: Similar to the HASH method, but allows specifying multiple columns. The data kernel calculates the hash-function results of these columns for partitioning. KEY_55: Similar to KEY_51, but KEY_51 and KEY_55 differ in the hash algorithms used internally. LINEAR_HASH: Linear hash partitioning, similar to HASH, but employs a linear hash algorithm, resulting in a more even data distribution. LINEAR_KEY_51: Similar to KEY_51, but employs a linear hash algorithm. LINEAR_KEY_55: Similar to KEY_55, but employs a linear hash algorithm. RANGE: Partitions data based on the range of given columns. Each partition contains data within a specific range. LIST: Partitions data based on a list of discrete values for given columns. RANGE_COLUMNS: Similar to RANGE partitioning, but allows partitioning based on the range of multiple columns. LIST_COLUMNS: Similar to LIST partitioning, but allows partitioning based on a list of discrete values for multiple columns. AUTO: Automatic partition type. The system automatically selects an appropriate partitioning policy based on the characteristics of the data. AUTO_LINEAR: Automatic linear partition type. The system automatically selects an appropriate linear partition policy based on the characteristics of the data. |
PARTITION_EXPRESSION | VARCHAR(2048) | The expression of the partition function used in the CREATE TABLE or ALTER TABLE statements for the current partition scheme. |
SUBPARTITION_TYPE | ENUM | Subpartition type, supports the following HASH KEY_51 KEY_55 LINEAR_HASH LINEAR_KEY_51 LINEAR_KEY_55 |
SUBPARTITION_EXPRESSION | VARCHAR(2048) | Subpartition expression, defined in the same way as PARTITION_EXPRESSION. |
HIDDEN | ENUM('Explicit', 'Implicit') | Explicitly created PARTITION POLICY by users or implicitly created PARTITION POLICY automatically generated by the database. |
SE_PRIVATE_DATA | MEDIUMTEXT | Reserved fields. |
tdsql> SELECT * FROM information_schema.partition_policies;+----+----------------+----------------+----------------------+-------------------+-------------------------+----------+-----------------+| ID | NAME | PARTITION_TYPE | PARTITION_EXPRESSION | SUBPARTITION_TYPE | SUBPARTITION_EXPRESSION | HIDDEN | SE_PRIVATE_DATA |+----+----------------+----------------+----------------------+-------------------+-------------------------+----------+-----------------+| 1 | impl_pp_hash_4 | HASH | INTEGER | NULL | NULL | Implicit | NULL |+----+----------------+----------------+----------------------+-------------------+-------------------------+----------+-----------------+1 row in set (0.01 sec)
피드백