Note
This view is available starting with V4.0.0.
Overview
Displays the template-based subpartition information of the partitioned tables in the current tenant.
Columns
Field Name |
Type |
Whether can be NULL |
Description |
|---|---|---|---|
| USER_NAME | varchar(128) | NO | Owner of the partitioned table |
| TABLE_NAME | varchar(128) | NO | Partitioned Table Name |
| SUBPARTITION_NAME | varchar(132) | NO | Subpartition Name |
| SUBPARTITION_POSITION | bigint(21) | NO | Subpartition Location |
| TABLESPACE_NAME | varchar(30) | NO | Tablespace name of the partition |
| HIGH_BOUND | mediumtext | NO | Partition template expression |
| COMPRESSION | varchar(4) | NO | Specifies whether the data of each newly added composite partition in the subpartition template is stored in compressed format. Valid values:
|
| INDEXING | varchar(4) | NO | Specifies whether the data of each newly added composite partition in the subpartition template is considered a partial index:
|
| READ_ONLY | varchar(4) | NO | Specifies whether the data of each newly added composite partition in the subpartition template is read-only:
|
Sample query
The system tenant queries the template-based subpartition information of its own partitioned table.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_SUBPARTITION_TEMPLATES;
The query result is as follows:
+-----------+------------+-------------------+-----------------------+-----------------+------------+-------------+----------+-----------+
| USER_NAME | TABLE_NAME | SUBPARTITION_NAME | SUBPARTITION_POSITION | TABLESPACE_NAME | HIGH_BOUND | COMPRESSION | INDEXING | READ_ONLY |
+-----------+------------+-------------------+-----------------------+-----------------+------------+-------------+----------+-----------+
| test | t_m_rclc | mp0 | 1 | NULL | 1,3 | NULL | NULL | NULL |
| test | t_m_rclc | mp1 | 2 | NULL | 4,6 | NULL | NULL | NULL |
| test | t_m_rclc | mp2 | 3 | NULL | 7 | NULL | NULL | NULL |
+-----------+------------+-------------------+-----------------------+-----------------+------------+-------------+----------+-----------+
3 rows in set
References
Query the template-based subpartition information of partitioned tables for all tenants: CDB_SUBPARTITION_TEMPLATES
For information about how to create a partitioned table with templates, see Create a partitioned table.
