compression_algorithm specifies the compression protocol and compression level of the OceanBase 2.0 protocol.
| Attribute | Description |
|---|---|
| Parameter type | String |
| Default value | Empty string, indicating not using compression function. |
| Value range | The parameter value is in the format of <algorithm_name>:<compression_level>. Currently, algorithm_name supports only zlib, and compression_level is in the range of [0,9]. The value 0 indicates to disable the compression protocol and the compression feature of the OceanBase 2.0 protocol. |
Note
This parameter takes effect only for new connections.
Examples
Log on to OceanBase Database in proxy mode through OceanBase Database Proxy (ODP) as the root@sys user or log on to ODP as the root@proxysys user.
Here is an example of logging on to OceanBase Database in proxy mode through ODP as the root@sys user. For more information about the parameters, see Connect to an OceanBase Database tenant by using OBClient.
[admin@obtest ~]$ obclient -uroot@sys#obcluster -h10.10.10.1 -P2883 -pNotice
To use ODP commands in OceanBase Database, the IP address (
-h) and the connection port (-P) must be the address and listening port (listen_port) of ODP.Here is an example of logging on to ODP as the root@proxysys user. The IP address (
-h) is the IP address of ODP, and the connection port (-P) is the listening port (listen_port) of ODP.[admin@obtest ~]$ obclient -uroot@proxysys -h10.10.10.1 -P2883 -pRun the following command to set the compression level to 5:
[admin@obtest ~]$ alter proxyconfig set compression_algorithm='zlib:5';