Lesson 3.2

Reading EXPLAIN ANALYZE

The plan tells you what the database did and what it expected. A large gap between estimated and actual rows is usually the real problem.

Duration
10m
Level
Intermediate
Students
7.6k students

Overview

The plan tells you what the database did and what it expected. A large gap between estimated and actual rows is usually the real problem.

In this lesson you will:

  • Read a plan from the innermost node outwards
  • Spot sequential scans that should be index scans
  • Compare estimated against actual row counts

Resources

PostgreSQL documentation

The official reference for the tools used in this lesson.