QUERY_PLAN_AFTER_RUN Option

Prints the entire query plan after query execution is complete.

Allowed Values

ON, OFF

Default

ON

Scope

Option can be set at the database (PUBLIC) or user level. When set at the database level, the value becomes the default for any new user, but has no impact on existing users. When set at the user level, overrides the PUBLIC value for that user only. No system privilege is required to set option for self. System privilege is required to set at database level or at user level for any user other than self.

Requires the SET ANY PUBLIC OPTION system privilege to set this option. Can be set temporary for an individual connection or for the PUBLIC role. Takes effect immediately.

Description

When QUERY_PLAN_AFTER_RUN is turned ON, the query plan is printed after the query has finished running. This allows the query plan to include additional information, such as the actual number of rows passed on from each node of the query.

For this option to work, the QUERY_PLAN option must be set to ON. You can use this option in conjunction with QUERY_DETAIL to generate additional information in the query plan report.

Related reference
QUERY_DETAIL Option
QUERY_PLAN Option
QUERY_PLAN_AS_HTML Option