Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Usage specification recommendations
INFORMATION_SCHEMA.PARTITION_POLICY_AFFINITIES is used to describe the affinity list within PARTITION POLICY. User tables are bound to PARTITION POLICY, and PARTITION POLICY AFFINITIES maintains which user tables and user partitions have affinity.Field Name | Type | Description |
PARTITION_POLICY_ID | BIGINT UNSIGNED | the unique ID of PARTITION POLICY. |
PARTITION_POLICY_NAME | VARCHAR(64) | the unique NAME of PARTITION POLICY. |
PARTITION_ID | BIGINT UNSIGNED | the unique ID of the PARTITION of the PARTITION POLICY |
PARTITION_NAME | VARCHAR(64) | the unique NAME of the PARTITION of the PARTITION POLICY |
SUBPARTITION_NAME | VARCHAR(64) | the unique NAME of the SUBPARTITION of the PARTITION POLICY |
DATA_OBJECT_TYPE | ENUM | The type of this data object. BASE_TABLE: table. BASE_INDEX: index. AUTOINC: The allocator for auto-increment values for user-defined auto-increment columns. BASE_HIDDEN_PK: The allocator for auto-increment values for hidden primary keys. PARTITION_L1: first-level partition. PARTITION_L1_INDEX: first-level partition index. PARTITION_L1_HIDDEN_PK: The allocator for auto-increment values for hidden primary keys of first-level partitions. PARTITION_L2: second-level partition. PARTITION_L2_INDEX: second-level partition index. PARTITION_L2_HIDDEN_PK: The allocator for auto-increment values for hidden primary keys of second-level partitions. UNKNOWN: unknown type. |
DATA_OBJECT_NAME | VARCHAR(259) | The NAME of the data object. |
DATA_OBJECT_TINDEX_ID | INT UNSIGNED | The global ID of the data object. |
DATA_OBJECT_KEY_RANGE_START | VARCHAR(8) | The starting point of the data range for the data object (inclusive). |
DATA_OBJECT_KEY_RANGE_END | VARCHAR(8) | The end point of the data range for the data object (exclusive). |
HIDDEN | ENUM('Explicit', 'Implicit') | User-explicitly created PARTITION POLICY or database-automatically created implicit PARTITION POLICY. |
SE_PRIVATE_DATA | MEDIUMTEXT | Reserved fields. |
tdsql> SELECT * FROM information_schema.partition_policy_affinities order by partition_policy_id, partition_id;+---------------------+-----------------------+--------------+----------------+-------------------+------------------+------------------+-----------------------+-----------------------------+---------------------------+----------+-----------------+| PARTITION_POLICY_ID | PARTITION_POLICY_NAME | PARTITION_ID | PARTITION_NAME | SUBPARTITION_NAME | DATA_OBJECT_TYPE | DATA_OBJECT_NAME | DATA_OBJECT_TINDEX_ID | DATA_OBJECT_KEY_RANGE_START | DATA_OBJECT_KEY_RANGE_END | HIDDEN | SE_PRIVATE_DATA |+---------------------+-----------------------+--------------+----------------+-------------------+------------------+------------------+-----------------------+-----------------------------+---------------------------+----------+-----------------+| 7 | impl_pp_hash_2 | 12 | p0 | NULL | PARTITION_L1 | db0.t_hash2_1.p0 | 10049 | 00002741 | 00002742 | Implicit | NULL || 7 | impl_pp_hash_2 | 12 | p0 | NULL | PARTITION_L1 | db0.t_hash2_2.p0 | 10052 | 00002744 | 00002745 | Implicit | NULL || 7 | impl_pp_hash_2 | 13 | p1 | NULL | PARTITION_L1 | db0.t_hash2_1.p1 | 10050 | 00002742 | 00002743 | Implicit | NULL || 7 | impl_pp_hash_2 | 13 | p1 | NULL | PARTITION_L1 | db0.t_hash2_2.p1 | 10053 | 00002745 | 00002746 | Implicit | NULL |+---------------------+-----------------------+--------------+----------------+-------------------+------------------+------------------+-----------------------+-----------------------------+---------------------------+----------+-----------------+4 rows in set (0.44 sec)
피드백