PostgreSQL 18.7 and 19.0: Expression Aggregates 31.6% Slower thestacksentinel.co...
HN Best 200 @best
PostgreSQL 18.7 and 19.0: Expression Aggregates 31.6% Slower thestacksentinel.com · 9 points · 0 comments · HN thread
TL;DR A lab benchmark by The Stack Sentinel compares PostgreSQL 18.7 with 19.0 on a 10M-row table in Docker on a Ryzen desktop. The expression-heavy aggregate ran 31.6% slower on 19.0 (923 ms vs 701 ms), while a filtered count ran 16.4% faster; turning JIT back on in 19.0 brought the aggregate to 732 ms, which the authors call no clear difference from 18.7. The story has 9 points and no comments.
- Expression-heavy aggregate over 10M rows: 701 ms on 18.7, 923 ms on 19.0 (31.6% slower), 732 ms on 19.0 with JIT on.
- Filtered count over 10M rows: 201 ms on 18.7, 168 ms on 19.0 (16.4% faster), but 196 ms with JIT on, 16.7% slower than default 19.0.
- Load, pgbench read-only and read-write, GROUP BY and top-100 sort showed no clear difference between 18.7 and 19.0 in the authors' runs.
- PostgreSQL 19 disables JIT by default because its optimizer-cost activation was judged unreliable; the test ran 18.7 with JIT on and 19.0 with JIT off.
- Method: median of 11 rounds after a warm-up, 8 cores and 6 GB per container, in-memory data on tmpfs, default settings, one Windows 11 WSL 2 machine.
- The authors' self-test of 18.7 against itself showed differences up to 1.7%, and they note results may differ on Linux servers or tuned configurations.
Discussion No comments have been posted on this story yet, so there is no discussion to summarize and no mood to report.