compression_algorithm specifies the compression protocol and compression level of the OceanBase 2.0 protocol.
| Attribute | Description |
|---|---|
| Parameter type | String |
| Default value | This parameter has no default value. If this parameter is not specified, data is not compressed. |
| Value range | The parameter value is in the format of <algorithm_name>:<compression_level>. At present, algorithm_name supports only zlib, and compression_level is in the range of [0, 9]. The value 0 specifies not to use the compression protocol and the compression feature of the OceanBase 2.0 protocol. |
| Effective upon ODP restart | No |
Note
This parameter takes effect only for new connections.
Examples
Log in to OceanBase Database through OceanBase Database Proxy (ODP) as the
root@sysuser or log in to ODP as theroot@proxysysuser.Here is an example of logging in to OceanBase Database through ODP as the
root@sysuser. For more information, 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 (specified by
-h) and the port (specified by-P) for connecting to OceanBase Database must be the IP address and listening port (specified bylisten_port) of ODP.Here is an example of logging in to ODP as the
root@proxysysuser. The IP address (specified by-h) is the IP address of ODP, and the port (specified by-P) is the listening port (specified bylisten_port) of ODP.[admin@obtest ~]$ obclient -uroot@proxysys -h10.10.10.1 -P2883 -pSet the compression level to 5.
obclient> alter proxyconfig set compression_algorithm='zlib:5';