liveBook · Manning

Execution plan

Also called query plan

An execution plan is a structured representation of intended operations or tasks and their organization for carrying out a query or other task.

How 5 Manning books explain it

Just Use Postgres!

A query execution plan is the database engine's planned sequence of operations for executing a SQL query, optionally including runtime analysis.

How it is used
Diagnoses query behavior and guides optimization decisions before adding or changing indexes.
How deep it goes
Explains plan nodes, runtime metrics, scans, joins, aggregation, sorting, and planner tradeoffs without covering complete optimizer internals.
Examples
Demonstrates CTE ranking, player statistics, regional filtering, JSON expression indexes, and time-series aggregation plans.
What you can do after
Diagnose query costs with PostgreSQL EXPLAIN and EXPLAIN ANALYZE, then evaluate whether indexes or query changes improve execution.

Read how Just Use Postgres! explains execution plan →

100 SQL Server Mistakes and How to Avoid Them

A query plan is the execution strategy selected or generated for processing a database query.

How it is used
Diagnoses query performance by revealing the operators and strategy selected to return requested data.
How deep it goes
Explains optimizer-selected operators, estimated cost, plan access, and hints, but stops short of exhaustive optimizer internals.
Examples
Compares CustomerContacts scans with and without ORDER BY, then contrasts Nested Loops and forced Hash Join plans for a join.
What you can do after
Diagnose query performance with actual plans, compare operator costs, and prefer indexes or investigation before applying hints.

Read how 100 SQL Server Mistakes and How to Avoid Them explains execution plan →

MongoDB 8.0 in Action, Third Edition

A query execution plan is the database engine's strategy and sequence of operations for processing a query and returning its results.

How it is used
Diagnoses query efficiency by revealing selected operations, index use, examined data, and execution time.
How deep it goes
Explains plan selection, caching, execution stages, and runtime statistics, but does not detail planner internals beyond available output.
Examples
Uses mongosh explain commands and an IXSCAN-to-FETCH plan with execution statistics.
What you can do after
Diagnose query efficiency with db.collection.explain(), cursor.explain(), and selected verbosity modes.

Read how MongoDB 8.0 in Action, Third Edition explains execution plan →

PostgreSQL Mistakes and How to Avoid Them

A query plan is a representation of the operations and access methods a database system will use to execute a query.

How it is used
Diagnose slow PostgreSQL queries by exposing selected scan methods, filters, and index access paths.
How deep it goes
Explains planner cost selection, statistics and configuration inputs, scan choices, and EXPLAIN ANALYZE actual timings.
Examples
Uses an open-ticket count that moves from a sequential scan to an Index Only Scan through indexing.
What you can do after
Diagnose/debug with EXPLAIN and EXPLAIN ANALYZE to identify slow query paths and evaluate indexing tradeoffs.

Read how PostgreSQL Mistakes and How to Avoid Them explains execution plan →

Grokking Software Architecture

An execution plan is the database engine's strategy for executing a query, including the operations and access methods it will perform.

How it is used
Uses plans to make database query behavior visible and to catch risky infrastructure changes before deployment.
How deep it goes
Defines the plan’s role and explains Terraform change markers, but does not detail database plan internals.
Examples
Shows a Terraform plan creating a server, modifying a firewall, and destroying a database.
What you can do after
Evaluate a Terraform plan by spotting create, modify, and destroy actions before deployment.

Read how Grokking Software Architecture explains execution plan →

Also covered in

What to know first

Related concepts

Questions about execution plan

What is execution plan?

An execution plan is a structured representation of intended operations or tasks and their organization for carrying out a query or other task.

Which Manning books explain execution plan?

Just Use Postgres!, 100 SQL Server Mistakes and How to Avoid Them, MongoDB 8.0 in Action, Third Edition, PostgreSQL Mistakes and How to Avoid Them and Grokking Software Architecture.

What should I know before learning execution plan?

Manning books that teach execution plan usually introduce SQL, metadata, performance and indexing first.

What is the difference between execution plan and reasoning?

An execution plan is a structured representation of intended operations or tasks and their organization for carrying out a query or other task. Reasoning is the process of deriving conclusions, solutions, or actions from available information through inferential steps.

What is execution plan also called?

Execution plan is also called query plan.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.