RTPC
Synopsis
[SQL] RTPC=n
n is either 1 or 0. The default value is 1.
Description
When RTPC is enabled (n = 1), InterSystems SQL performs extensive optimization of the query based on query input values. For example, RTPC does the following:
-
Scans for outlier values and optimizes queries based on outlier information.
-
Efficiently estimates the selectivity of range conditions based on more detailed table statistics.
-
Evaluates explicit and implicit truth value conditions.
-
Efficiently estimates the selectivity of list conditions.
For more information about RTPC query optimization, see Using Runtime Plan Choice.
RTPC and BiasQueriesAsOutlier cannot both be active at the same time. If both RTPC and BiasQueriesAsOutlier are set to 1, RTPC is activated and the BiasQueriesAsOutlier setting is ignored. When RTPC is set, InterSystems SQL determines whether to use outlier optimization on a per-query basis.
If AdaptiveMode is enabled (set to 1) and RTPC is disabled, then Adaptive Mode overrides the RTPC setting and enables Runtime Plan Choice.
Changing This Parameter
To set the desired value for RTPC from the Terminal, use the SetOption(“RTPC”)Opens in a new tab method of the %SYSTEM.SQL.UtilOpens in a new tab class. See the class reference for details.
You can also change RTPC with the Config.SQLOpens in a new tab class (as described in the class reference) or by editing the CPF in a text editor (as described in Editing the Active CPF).