Q29 PostgreSQL Domain 2 · 25–30% of exam

What does the ef_search parameter control in an HNSW vector index query?

  1. A Index build thread count
  2. B Number of candidates evaluated during search; higher = better recall but slower queries (correct answer)
  3. C Maximum distance threshold
  4. D Compression factor

Shortcut: ef_search=N controls the dynamic candidate list size during HNSW search. Higher values improve recall at the cost of query latency.

SET hnsw.ef_search=N controls the dynamic candidate list size during HNSW search. Higher values improve recall at the cost of query latency.