Overview
Displays the columns contained in the subpartitioning keys of partition objects (partitioned tables and partitioned indexes) for all tenants.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| CON_ID | bigint(20) | NO | Tenant ID |
| OWNER | varchar(128) | NO | Owner of a partitioned table or partitioned index |
| NAME | varchar(128) | NO | The name of the partitioned table or partitioned index. |
| OBJECT_TYPE | varchar(5) | NO | Type of the partition object:
|
| COLUMN_NAME | text | NO | Column name |
| COLUMN_POSITION | bigint(21) | NO | Position in the Partitioning Key |
| COLLATED_COLUMN_ID | bigint(0) | NO | This field is not currently supported and defaults to NULL. |
Sample query
In the sys tenant, view the columns contained in the subpartitions of the partitioned table tbl2_f_rl for the tenant with ID 1002.
obclient [oceanbase]> SELECT * FROM oceanbase.CDB_SUBPART_KEY_COLUMNS WHERE CON_ID=1002 AND NAME='tbl2_f_rl';
The query result is as follows:
+--------+----------+-----------+-------------+-------------+-----------------+--------------------+
| CON_ID | OWNER | NAME | OBJECT_TYPE | COLUMN_NAME | COLUMN_POSITION | COLLATED_COLUMN_ID |
+--------+----------+-----------+-------------+-------------+-----------------+--------------------+
| 1002 | infotest | tbl2_f_rl | TABLE | col2 | 1 | NULL |
+--------+----------+-----------+-------------+-------------+-----------------+--------------------+
1 row in set
References
For information about the columns contained in the subpartitioning keys of all partition objects under the current tenant, see DBA_SUBPART_KEY_COLUMNS.