{
  "id": 22521038,
  "title": "PostgreSQL Redundant Indexes: Is an Index on (a) Redundant When You Have (a, b)?",
  "url": "https://urgent.news/2026/11/29/postgresql-redundant-indexes-is-an-index-on-a-redundant-when-you-have",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-11-29T05:29:32.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/tbson87/postgresql-redundant-indexes-is-an-index-on-a-redundant-when-you-have-a-b-1ang"
  },
  "original_language": null,
  "account": "A PostgreSQL b-tree index on a single column, such as (a), can be redundant when another b-tree index starts with that column, like (a, b). In PostgreSQL 18.3, the wider index served the same lookup as the narrower one, requiring the same number of heap reads. Therefore, it is not necessary to maintain both indexes in such cases. However, there are exceptions where the narrower index has unique characteristics that make it valuable, such as being a UNIQUE index, using a different operator class, or including additional columns that the wider index does not. It is advisable to evaluate each index individually, rather than relying solely on the presence of a wider index with the same leading column.",
  "summary": "Disclosure: I build Schemity , a desktop ERD tool - this post is from our blog and uses it for the examples. TL;DR: A plain b-tree index on (a) is redundant when another b-tree index starts with a , such as (a, b) : PostgreSQL 18.3 served the same lookup from the wider index with the same number of heap reads. Do not drop it on that rule if it is UNIQUE , uses a different operator class or has…",
  "summary_source": "publisher",
  "key_points": [],
  "editors_take": "Removing unnecessary single-column indexes can save resources, but developers must check for unique constraints or specific operator classes before deleting them.",
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}