Databases · Flashcard

What is a partial index?

  • AAn index built over only the rows matching a WHERE clause — smaller and cheaper to maintain
  • BAn index covering only a subset of the table's columns — the others remain unindexed
  • CAn index that is built gradually during idle periods — construction pauses under load
  • DAn index storing only truncated key prefixes — longer values are cut to save space

Why this is the answer

CREATE INDEX ... WHERE status = 'active' indexes just the matching rows — ideal when queries target a small hot subset. Column selection is simply a normal index's column list, PostgreSQL builds indexes in one operation (CONCURRENTLY changes locking, not scheduling), and prefix truncation describes MySQL's prefix indexes.

Official docs
Study in Gnoseed →