Skip to content
masterclass Buddy

PostgreSQL · Concept

Covering index

An index-only scan can answer a query from an index without reading the table heap. Use INCLUDE to build a covering index, but heap access can still be needed when visibility information requires it.

Last updated

Syntax

CREATE [ UNIQUE ] INDEX name ON table ( key_column [, ...] ) [ INCLUDE ( payload_column [, ...] ) ];

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • covering index
  • visibility map
  • B-tree indexes
  • GiST indexes
  • SP-GiST indexes
  • INCLUDE clause
  • partial indexes
  • expression indexes

Source: 11.9. Index-Only Scans and Covering Indexes. Checked 2026-11-03.