Q8 PostgreSQL Domain 2 · 25–30% of exam

An AI pipeline generates 1536-dimension embeddings. The PostgreSQL table will store 10 million rows. Which index type provides better query performance at scale?

  1. A No index (exact search)
  2. B IVFFlat with lists = 1000
  3. C HNSW with m=16, ef_construction=64 (correct answer)
  4. D B-tree on the vector column

Shortcut: HNSW provides better recall-speed trade-off than IVFFlat at large scale, especially for high-recall requirements. m=16 and ef_construction=64 are common starting parameters.