Benchmark: Bulk INSERT vs COPY in PostgreSQL
Knowledge
Specially about usage of pg gem.
- Don’t send too many rows using
COPYat once. - The TEXT format will be better than CSV format for
COPY.- The encoder class
PG::TextEncoder::CopyRowis nice.
- The encoder class
- The
COPYis faster than BulkINSERT.