Note
For V4.6.0, this parameter is available starting with V4.6.0.
Description
ob_vector_index_active_segment_max_size specifies the maximum memory usage of an active segment in a partition. When the memory usage of the active segment exceeds this threshold, the system triggers a freeze and persistence operation to write the incremental data in memory to disk.
Applicability
This parameter is applicable only to OceanBase Database in MySQL-compatible mode.
Privilege requirements
Query the parameter
The
systenant and MySQL user tenants can query the parameter by using theSHOW PARAMETERSstatement or theGV$OB_PARAMETERSview.Modify the parameter
The
systenant and MySQL user tenants can modify the parameter.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Cap |
| Default value | 0, indicating adaptive. The system automatically sets different thresholds based on the available vector memory of the tenant:
|
| Value range | [0, +∞), unit: MB |
| Modifiable | Yes. You can use the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
- Increase the threshold: This reduces the frequency of freezing, thereby avoiding the creation of excessive active segments during high-speed incremental writes, which can degrade search performance.
- Decrease the threshold: We recommend that you do not decrease the threshold in most scenarios. Frequent freezing operations can degrade overall search performance.
- Restart the database: If the threshold is too large, the system will take a longer time to restore memory data during a restart. We recommend that you decrease the threshold before a restart to reduce the time required for memory data restoration. Alternatively, you can restart the database during off-peak hours.
Examples
Set the maximum memory usage of an active segment in a partition to 256 MB.
ALTER SYSTEM SET ob_vector_index_active_segment_max_size = '256MB';
Query the current configuration.
SHOW PARAMETERS LIKE 'ob_vector_index_active_segment_max_size';
