Rebuilding Postgres for 300x faster analytics: batching, operator fusion, and SIMD
pgrust 0.2 achieves 300x faster analytical query performance than Postgres on ClickBench, even outperforming ClickHouse. The post walks through three key query engine optimizations using Rust code examples: (1) batching — replacing row-at-a-time Volcano model calls with 1024-element batches, cutting time from 1.3s to 480ms; (2) operator fusion — combining sequential scan and aggregation into a single node to eliminate copy overhead, reaching 358ms; and (3) SIMD — using ARM NEON intrinsics to process 8 floats per iteration, reaching 135ms. Together these yield ~10x improvement in the query engine alone, contributing to the overall 300x gain. JIT compilation, which enables operator fusion for arbitrary queries, is teased as a future topic.