0Pricing
SQL Academy · Lesson

Index-Only Scans and Visibility Map

Unlock index-only scans by covering queries and keeping the visibility map up-to-date.

What Is an Index-Only Scan?

Normally, an index lookup returns row IDs (TIDs), and the table must be visited to read the actual row. Index-Only Scan answers the query using the index alone — no heap visit. Hugely faster.

Conditions

Index-Only Scan requires:

  • All SELECTed columns must be in the index
  • The row's page must be marked "all visible" in the visibility map

All lessons in this course

  1. MVCC and Bloat Causes
  2. VACUUM, autovacuum, vacuum_cost_delay
  3. ANALYZE and pg_statistic
  4. Index-Only Scans and Visibility Map
← Back to SQL Academy