All posts
Data Platform

Postgres Write Performance, Measured: Batch Size, Indexes, Foreign Keys and Prepared Statements

By

November 9, 2026

7 min read

Inserting 20,000 rows one statement at a time ran at 775 rows a second; 1,000 rows per statement ran at 156,789, two hundred times faster on the same connection. Prepared statements nearly doubled read throughput. Each extra index cost about 3–4% of insert throughput, and a foreign key about 8%.

Benchmark
Postgres Performance
1 row per statement77510 rows7,489100 rows53,5791,000 rows156,789

Rows inserted per second from one connection, by rows per INSERT statement (log scale). Our measurements, November 2026.

The data
Rows per second
1 row per statement775
10 rows7,489
100 rows53,579
1,000 rows156,789

The full report adds insert throughput from 8 to 256 concurrent writers, the cost of 1, 3 and 6 indexes, foreign keys, prepared against unprepared statements, and the floor every query pays for a round trip.

Write throughput becoming a constraint?

We'll find where your writes spend their time. 30 minutes, free.

hoolco Monthly Review

Once a month: what changed in tech that month and what it means for you, from cloud and AI to security and the tools you build with. Every item links to its source. No sales pitch, unsubscribe in one click.

As of November 9, 2026. Provided as is, for general information, and accurate to the best of our knowledge on the date shown. Not legal, compliance, tax, financial or other professional advice. Prices, limits and vendor services change; check current vendor documentation before relying on anything here. Terms of use.