EXPLAIN
Returns a formatted description of the Vertica optimizer's plan for executing the specified statement.
Syntax
EXPLAIN [/*+ ALLNODES */] [explain-options] sql-statement
Parameters
/*+ALLNODES*/
|
Specifies to create a query plan that assumes all nodes are active, not valid with LOCAL option. |
explain‑options |
One or more [ LOCAL ] [ VERBOSE ] [ JSON ] [ ANNOTATED ]
|
sql‑statement | A query or DML statement—for example, SELECT , INSERT , UPDATE , COPY , and MERGE . |
Privileges
The same privileges required by the specified statement.
Requirements
The following requirements apply to EXPLAIN
's ability to produce useful information:
- Reasonably representative statistics of your data must be available. See Collecting Statistics in the Administrator's Guide for details.
EXPLAIN
produces useful output only if projections are available for the queried tables.- Qualifier options must be specified in the order shown earlier, otherwise
EXPLAIN
returns with an error. If an option is incompatible with any preceding options,EXPLAIN
ignores them.
See Also
Viewing Query Plans in the Administrator's Guide