Skip to main content

RTPC

Enable Runtime Plan Choice (RTPC) query optimization.

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.

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.

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 the Editing the Active CPF section of the “Introduction to the Configuration Parameter File” chapter in this book).

FeedbackOpens in a new tab