Skip to main content


Enable Runtime Plan Choice (RTPC) query optimization.


[SQL]    RTPC=n

n is either 1 or 0. The default value is 1.


When RTPC is enabled (n = 1), InterSystems SQL queries can perform optimization based on outlier information. For further details on outlier selectivity, refer to Tune Table in the “Optimizing Tables” chapter in InterSystems SQL Optimization Guide.

RTPC cannot be set to 1 if the BiasQueriesAsOutlier parameter is also set to 1. When BiasQueriesAsOutlier is set, InterSystems SQL is optimized for queries that often refer to the outlier.

Changing This Parameter

To set the desired value for RTPC from the Terminal, use the SetOption(“RTPC”) method of the %SYSTEM.SQL.Util class. See the class reference for details.

You can also change RTPC with the Config.SQL 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).