{
  "slug": "covering-index",
  "term": "Covering index",
  "aliases": [
    "index coverage"
  ],
  "definition": "A covering index supplies the data values needed by a particular query from index entries, without base-table access to obtain those values.",
  "note": "Coverage depends on the query, not just the index name. Adding an output column or a filter on a value absent from the index can remove coverage. SQLite illustrates this by appending output columns to a multi-column index. [sqlite-covering]\n\nPostgreSQL can carry non-key payload with INCLUDE. In UNIQUE (x) INCLUDE (y), uniqueness applies to x alone; y is not a search key. Wide payload duplicates storage and can exceed the index tuple size limit. B-tree deduplication is unavailable when an index has a non-key column. [pg-include]\n\nCoverage does not promise zero heap fetches. PostgreSQL may visit the heap to check visibility when its all-visible map bit is clear. The planner must also support and choose the access path. Partial-index membership can establish a predicate without storing its column. [pg-covering]\n\nCovering describes available query values, not a checksum, a content-verification operation or a measured speedup. The linked analysis separates these questions. [hesela-coverage]",
  "related": [
    "b-tree",
    "postgresql-index-only-scan",
    "secondary-index",
    "predicate-selectivity"
  ],
  "citations": [
    {
      "id": "sqlite-covering",
      "title": "SQLite Query Planning: covering indexes",
      "url": "https://www.sqlite.org/queryplanner.html#covidx",
      "accessed": "2026-11-18"
    },
    {
      "id": "pg-covering",
      "title": "PostgreSQL 18: Index-Only Scans and Covering Indexes",
      "url": "https://www.postgresql.org/docs/18/indexes-index-only-scans.html",
      "accessed": "2026-11-18"
    },
    {
      "id": "pg-include",
      "title": "PostgreSQL 18: CREATE INDEX, INCLUDE",
      "url": "https://www.postgresql.org/docs/18/sql-createindex.html",
      "accessed": "2026-11-18"
    },
    {
      "id": "hesela-coverage",
      "title": "Hesela: PostgreSQL TOAST and index read coverage",
      "url": "https://hesela.com/analyses/postgresql-toast-read-coverage/",
      "accessed": "2026-11-18"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-18",
  "provenance": [
    "Primary-source synthesis; PostgreSQL INCLUDE and visibility behavior scoped to version 18 documentation, separate from the analysis's earlier PostgreSQL 16.15 experiments. No benchmark or new PostgreSQL execution."
  ]
}
