Note
This parameter was introduced starting from V4.3.5 BP2.
Description
global_index_auto_split_policy is used to control whether automatic partitioning is enabled for newly created global indexes.
Privilege requirements
Query the parameter
Both the
systenant and all user tenants can query this parameter using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
Both the
systenant and user tenants can modify this parameter using theALTER SYSTEM SETstatement.
Attributes
| Attribute | Description |
|---|---|
| Parameter type | String |
| Default value | DISTRIBUTED |
| Value range |
|
| Modifiable | Yes, you can modify this parameter using the ALTER SYSTEM SET statement. |
| Effective upon OBServer node restart | No, it takes effect immediately after being set. |
Considerations
Adjust the value of the global_index_auto_split_policy parameter using the ALTER SYSTEM SET statement. As long as the main table is an automatically partitioned table, the global index will also be automatically partitioned. If the main table is not an automatically partitioned table, then the configuration follows the global_index_auto_split_policy policy.
If
global_index_auto_split_policyis set toALL, automatic partition splitting is enabled by default when creating a new global index.If
global_index_auto_split_policyis set toDISTRIBUTED, only when the tenant has multiple node resources and the main table is a partitioned or automatically partitioned table, will the global index table actually be created as an automatically partitioned table.If
global_index_auto_split_policyis set toOFF, the policy follows that of the main table.- If you change the value of
global_index_auto_split_policytoDISTRIBUTEDorALL, it does not affect existing tables that already meet the requirements for automatic partitioning; it only takes effect for newly created tables.
- If you change the value of
For more details on automatic partitioning, see Automatic partition splitting (MySQL-compatible mode) or Automatic partition splitting (Oracle-compatible mode).
Example
Enable automatic partitioning for newly created global indexes:
obclient> ALTER SYSTEM SET global_index_auto_split_policy = 'ALL';
References
For information on controlling whether a tenant enables automatic partitioning, see enable_auto_split.