Q3 PostgreSQL Domain 2 · 25–30% of exam

What is the purpose of the lists parameter in a pgvector IVFFlat index?

  1. A Number of index pages to cache
  2. B Number of inverted file lists (clusters) created during indexing, balancing build time and query accuracy (correct answer)
  3. C Maximum number of rows in the index
  4. D Index compression level

Shortcut: lists determines how many clusters the IVFFlat index builds. More lists = faster queries (fewer vectors checked per list) but requires more memory. Recommended: sqrt(rows) to rows/1000.