Note
This variable was introduced in OceanBase Database V1.4.
Description
ob_route_policy specifies the routing strategy for selecting a replica within an OBServer node.
Attributes
| Attribute | Description |
|---|---|
| Type | ENUM |
| Default value | 1 |
| Value range |
|
| Effective scope |
|
| Modifiable | Yes. You can use the SET statement to modify the variable. |
Examples
Set the routing strategy for selecting a replica within an OBServer node to preferentially routing requests to the zone where a read-only replica resides.
Session-level operation
obclient> SET ob_route_policy = 'READONLY_ZONE_FIRST';or
obclient> SET ob_route_policy = 1;Global-level operation
obclient> SET GLOBAL ob_route_policy = 'READONLY_ZONE_FIRST';or
obclient> SET GLOBAL ob_route_policy = 1;