Which index type suits equality lookups on a JSONB column's keys?
- A B-tree on the whole column
- B GIN with jsonb_path_ops (correct answer)
- C HNSW
- 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.