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

Which session parameter tunes the recall/latency trade-off for HNSW at query time?

  1. A ivfflat.probes
  2. B hnsw.ef_search (correct answer)
  3. C work_mem
  4. D random_page_cost

Shortcut: ef_search controls how many candidates are examined per query. Higher values improve recall at the cost of latency, and can be set per session or per transaction.

SET hnsw.ef_search controls how many candidates are examined per query. Higher values improve recall at the cost of latency, and can be set per session or per transaction.