Query consistency policy
A workload group's query consistency policy allows specifying options that control the consistency model of queries.
The policy object
Each option consists of:
- A typed
Value- the value of the limit. IsRelaxable- a boolean value that defines if the option can be relaxed by the caller, as part of the request's Client request properties. Default istrue
The following limits are configurable:
| Name | Type | Description | Supported values | Default value | Matching client request property |
|---|---|---|---|---|---|
| QueryConsistency | QueryConsistency |
The consistency model to use. | Strong, Weak, or WeakAffinitizedByQuery, WeakAffinitizedByDatabase |
Strong |
queryconsistency |
| CachedResultsMaxAge | timespan |
The maximum age of cached query results that can be returned. | A non-negative timespan |
null |
query_results_cache_max_age |
Note
The default value applies in the following cases:
- The policy isn't defined, and the client request option isn't set.
- The policy is defined, the option isn't defined, and the client request option isn't set.
- The policy is defined, the option is defined with
nullas itsValue, and the client request option isn't set.
Example
"QueryConsistencyPolicy": {
"QueryConsistency": {
"IsRelaxable": true,
"Value": "Weak"
},
"CachedResultsMaxAge": {
"IsRelaxable": true,
"Value": "05:00:00"
}
}
Control commands
Manage the workload group's query consistency policy with Workload groups control commands.