EXPLAIN

EXPLAIN

Shows the execution plan for a SQL expression or, given the ID of a running query, shows the execution plan plus additional runtime information and metrics.

EXPLAIN (sql_expression|query_id);