Home / Companies / Tiger Data / Blog / Post Details
Content Deep Dive

Benchmarking PostgreSQL Batch Ingest

Blog post from Tiger Data

Post Details
Company
Date Published
Author
James Blackwood
Word Count
2,638
Language
English
Hacker News Points
2
Summary

This article explores different methods for batch ingestion in PostgreSQL, including INSERT...VALUES, INSERT...UNNEST, and COPY. The author built a custom benchmarking tool to measure the end-to-end performance of each method. Results show that binary COPY is substantially faster than other methods when using larger batch sizes due to its ability to bypass server-side parsing and use a dedicated ring buffer. However, text COPY can be a good middle-ground for flexibility and ease of use over larger batches. The choice of method depends on factors such as batch size, application requirements, and framework support.