
Training a 4B model to produce 81% faster query plans than Postgres
...or how to make Qwen learn query optimization via agentic reinforcement learning
Database engineers, systems programmers, and developers interested in query engine internals and performance optimization
pgrust 0.2 is 10x faster than its predecessor, 30% faster than Postgres on OLTP workloads, and 300x faster on the Clickbench analytical benchmark.
The performance gain primarily comes from replacing Postgres' row-at-a-time Volcano model query engine with a batched executor that reduces per-row function call overhead. Additional optimizations include operator fusion and SIMD vectorization to lower CPU and memory bandwidth usage per query.