Overview
The ap_query_route_policy parameter specifies the adaptive selection policy for AP queries to replica.
Privilege requirements
Query variables
Global level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.GLOBAL_VARIABLESview to view the values of global system variables.Session level
Both the
systenant and all user tenants can use theSHOW VARIABLESstatement and theinformation_schema.SESSION_VARIABLESview to view the values of session system variables.
Modify variables
Global effective
The
systenant can directly modify the values of global system variables.The user tenant must have the
SUPERorALTER SYSTEMprivilege to modify the value of a global system variable.
Session expiration
The
systenant and all user tenants can directly modify the values of session system variables for their own tenants.
Attributes
Attribute |
Description |
|---|---|
| Parameter type | Enum |
| Default Value | AUTO |
| Value range |
|
| Effective Scope |
|
| Modifiable | Yes, you can use theSETStatement modification. |
Usage instructions
The ap_query_route_policy variable is a switch that controls the adaptive selection of columnstore replicas. For clusters without columnstore replicas, the value of the ap_query_route_policy variable has no effect.
This variable can also be controlled at the query level using the opt_param hint.
Configuration example
Set the value of ap_query_route_policy to AUTO.
Session expiration
obclient> SET ap_query_route_policy = 'AUTO';Effective globally
obclient> SET GLOBAL ap_query_route_policy = 'AUTO';