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

An HNSW index build on 5 million vectors is extremely slow. Which server parameter most improves build time?

  1. A work_mem
  2. B maintenance_work_mem (correct answer)
  3. C max_connections
  4. D effective_cache_size

Shortcut: Index construction uses maintenance_work_mem. Raising it (and max_parallel_maintenance_workers) lets more of the graph be built in memory, substantially reducing build time.