postgresql-index-only-scan · shipping · also PostgreSQL index-only scan

Index-only scan (PostgreSQL)

A PostgreSQL index-only scan retrieves values from index entries and consults the heap when visibility cannot be established from the visibility map.

Related Observatory article: Index-only scan (PostgreSQL) on hesela.com

The index must support returning the needed values, and the query must be answerable from that index. A covering index can carry extra payload columns through INCLUDE, but that duplicates data and can increase index size. [1]

The plan name does not promise zero heap visits. For a candidate index tuple, a set all-visible map bit permits skipping the heap visibility check. A clear bit requires that check; returned values still come from the index. [1] [3]

In REL_16_15, Heap Fetches counts attempts to fetch a heap tuple for visibility, including attempts that find no visible tuple. It does not count unique pages or physical disk reads, and it is not a checksum-verification counter. [3]

Relations

related
Visibility map (PostgreSQL), PostgreSQL TOAST, Detoasting, B-tree, B-link tree

Citations

  1. PostgreSQL 16: Index-Only Scans and Covering Indexes (accessed 2026-10-21)
  2. PostgreSQL REL_16_15: IndexOnlyNext, visibility checks and heap-fetch instrumentation (accessed 2026-10-21)

Further reading

  1. PostgreSQL 16: Visibility Map (accessed 2026-10-21)
Sources & caveats
  • The counter interpretation is scoped to PostgreSQL REL_16_15. The linked Observatory demonstration uses synthetic clean rows, not injected corruption or a disk-I/O benchmark.

JSON: /data/terms/postgresql-index-only-scan.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Index-only scan (PostgreSQL). Hesela. 2026-10-22. https://hesela.dev/terms/postgresql-index-only-scan/