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

What is the recommended way to batch-insert millions of embedding rows efficiently?

  1. A Individual INSERT statements in autocommit
  2. B COPY (or the binary COPY protocol) with the vector index created afterwards (correct answer)
  3. C INSERT ... ON CONFLICT per row
  4. D Using a stored procedure loop

Shortcut: COPY is dramatically faster than row-by-row inserts, and deferring index creation until after the load avoids the cost of incrementally maintaining the graph during ingestion.