Which pgvector index type should you create only after the table already holds representative data, because it builds its clusters from the existing rows?
- A IVFFlat (correct answer)
- B HNSW
- C B-tree
- D GIN
Shortcut: IVFFlat = load the data first, then build the index. HNSW has no training step and can be created before any data is loaded, although building it after a bulk load is still faster.
IVFFlat divides vectors into lists based on the rows present when the index is built, so creating it on an empty table gives poor recall. HNSW has no training step and can be created before any data is loaded, although building it after a bulk load is still faster. B-tree and GIN aren't vector indexes.