pgrust 0.2 版本通过引入批处理、算子融合和 SIMD 等优化技术,在分析型数据库基准测试中实现了显著的性能改进 [1]。该版本相比前一版本性能提升 10 倍 [1],在 OLTP 基准测试中比 PostgreSQL 快 30% [1],而在 Clickbench 分析数据库基准测试中的表现更为突出,比 PostgreSQL 快 300 倍,甚至超越了 Clickhouse [1]。
查询引擎优化贡献了约 10 倍的性能收益 [1]。在具体应用上,一条简单求和查询在原生 PostgreSQL 中耗时约 20 秒,而优化后的版本仅需 358 毫秒,快约 55 倍 [1]。批处理技术单独可将查询时间从 1.3 秒降低至 480 毫秒 [1];算子融合优化后的性能与原生 for 循环相当 [1];SIMD 优化进一步提升了速度,将耗时降至 135 毫秒,相比原生 for 循环快 3 倍,比原始 Volcano 模型快 10 倍 [1]。测试基于 AWS c8g.4xlarge 实例(Graviton4 处理器,16 个虚拟 CPU)上运行的 PostgreSQL 18.4,并在测试中禁用了并行查询 [1]。
pgrust version 0.2 has been released with substantial query engine optimizations that deliver dramatic performance gains across different workload types.[1] The new version runs 10 times faster than its predecessor and achieves a 30% speed advantage over Postgres in OLTP benchmarks.[1] Most impressively, on the Clickbench analytics database benchmark, pgrust 0.2 outperforms Postgres by 300 times and surpasses Clickhouse.[1]
The performance improvements stem from three key optimization techniques applied to the query engine.[1] Batching reduces query execution time from 1.3 seconds to 480 milliseconds, while operator fusion brings performance to match native for-loop implementations.[1] SIMD optimization further accelerates processing to 135 milliseconds, achieving a 3x speedup over native for-loops and a 10x improvement over the original Volcano model.[1] These enhancements collectively contribute approximately 10 times the overall performance gain.[1] In a practical example, a simple summation query that takes roughly 20 seconds in Postgres completes in 358 milliseconds with the optimized Rust version—approximately 55 times faster.[1]
The benchmarks were conducted on an AWS c8g.4xlarge instance equipped with Graviton4 processors and 16 vCPUs, running PostgreSQL 18.4 with parallel queries disabled.[1]