Answer
An execution plan describes the operations the database chooses to run a query. • Plan nodes can include scans, joins, sorts, and aggregates. • Estimated costs and row counts help explain optimizer decisions. • EXPLAIN ANALYZE executes the statement, so use it carefully with data-changing statements.
💡 SQL Example
EXPLAIN SELECT * FROM employees WHERE department_id = 10;
Result
A tree of planned database operations
⚡ Quick Revision
An execution plan shows how the database intends to execute a query.