Utility Function

TDV supports a utility function named EXPLAIN. This function makes the query execution plan available to JDBC clients (as well as Studio users). The actual query is not executed.

Option

Description Example Syntax

show_source_plan="true"

Retrieves the query plan. This can also be used in the SQL Scratchpad.

explain select
{option show_source_plan="true"}
* from <view>

show_runtime="true"

Retrieves the execution statistics (plan and runtime statistics). This can also be used in the SQL Scratchpad.

explain select
{option show_runtime="true"}
* from <view>

Syntax

EXPLAIN <any_SQL-statement>

Remarks

Preceding any SQL statement with the keyword EXPLAIN makes the query execution plan available in a text format that can be displayed either in Studio or in a JDBC client.