EXPLAIN
EXPLAIN shows the optimized query plan. The database optimizes the query normally, but it does not execute. Instead, the database returns the query plan in the specified format.
Syntax
SQL
This table defines the explain plan formats.
Examples
This example shows the optimized plan for the query
SELECT * FROM names in JSON format.
SQL
SELECT * FROM names in DEBUG format, which produces a more compact execution plan.
SQL
Text
EXPLAIN PIPELINE
EXPLAIN PIPELINE shows the pipeline the system uses for compiling a query. The system compiles the pipeline for the specified segments, and if no segment is specified, it picks random segments with the tables.
To explain a pipeline, you must be a system-level user or possess the SELECT TABLE privilege for the table used in the query.
Syntax
SQL
Examples
This example shows the pipeline on the query
SELECT * FROM names for a random segment.
SQL
529a2e9d-d06c-46cd-a93b-624d3bed1c08.
SQL
529a2e9d-d06c-46cd-a93b-624d3bed1c08, 378eac93-2e3d-4ce6-bf1f-d8b7a78fe585.
SQL

