Q39 PostgreSQL Domain 2 · 25–30% of exam Priority · Real Exam

Which index type suits equality lookups on a JSONB column's keys?

  1. A B-tree on the whole column
  2. B GIN with jsonb_path_ops (correct answer)
  3. C HNSW
  4. D BRIN

Shortcut: GIN indexes the contents of JSONB documents and supports containment operators efficiently. jsonb_path_ops produces a smaller, faster index for the @> operator.