Note
This parameter is available starting with V1.4.
Description
The default_compress_func parameter specifies the default compression algorithm for table data. You can also specify a different compression algorithm when you create a table.
Privilege requirements
Query the parameter
The
systenant and all user tenants can execute theSHOW PARAMETERSstatement or query theGV$OB_PARAMETERSview to query the parameter.Modify the parameter
Only the
systenant can modify the parameter. User tenants cannot modify the parameter.
Attributes
| Attribute | Description |
|---|---|
| Type | String |
| Default value | zstd_1.3.8 |
| Valid values |
|
| Modifiable | Yes. You can execute the ALTER SYSTEM SET statement to modify the parameter. |
| Effective upon OBServer node restart | No. The setting takes effect immediately. |
Considerations
The zlib algorithm of different minor versions may compress the same data to different results. This may cause the database to fail to restore the replica data during an upgrade. Therefore, starting from V4.2.2, OceanBase Database no longer supports the zlib_1.0 compression algorithm.
Example
The following example sets the default compression algorithm for table data to lz4_1.0.
obclient> ALTER SYSTEM SET default_compress_func = 'lz4_1.0';