DuckDB

Five tests, 335 million records, and one clear data winner emerges

Three years after a tie, the rematch delivers a decisive verdict.

3 min readTowards Data Science

Three years ago, Polars and DuckDB essentially tied in a head-to-head comparison. That was version 0.x territory, promising, but still maturing. Now both have shipped their 2.0 releases, and the rematch on datasets reaching 335 million records tells a more decisive story. Our take is straightforward: the gap has widened, and the winner is the tool that forces fewer compromises on the user.

The benchmarks, published on Towards Data Science, ran five real-world tests against Polars 2.0 and DuckDB 2.0. The results showed a consistent performance advantage for DuckDB, with one test, an aggregation over 335 million records, delivering a 14x speed difference. That is not a marginal edge. It is the kind of gap that changes which tool a team chooses for production workloads. We find this outcome particularly relevant when set alongside other recent developments in the ecosystem. Consider Ten Years of Persistence: Rust Finally Stabilises the Never Type: Polars is built on Rust, and the language's steady maturation has given it a solid foundation. Yet raw language performance does not automatically translate into the best user experience for data tasks. Meanwhile, as AI assistants still stumble on the tasks that matter most to you shows, even advanced tools can fall short where practical outcomes are concerned. DuckDB's win here is not about theoretical superiority, it is about what happens when you press "run" on a real query.

What does this mean for someone who reaches for a spreadsheet or a DataFrame library every day? It means the choice between these tools is no longer a toss-up. DuckDB 2.0 handles larger-than-memory datasets natively, with SQL syntax that many analysts already know. Polars remains excellent for in-memory, columnar workloads and offers a Python-native API that developers love. But when the data grows, and the clock is running, DuckDB pulls ahead. The 14x gap on the largest test is not an outlier, it reflects a design philosophy that prioritizes out-of-core processing from the start. Users who routinely work with hundreds of millions of records should take note: the tool that scales with your data without requiring you to rethink your workflow is the one worth adopting.

The practical consequence is clear. If you are evaluating a data stack for 2025 and beyond, DuckDB 2.0 deserves a serious look as your default query engine for analytical workloads. Polars 2.0 remains a strong choice for pipeline development and smaller-scale interactive work, but the benchmark results suggest it is no longer the default for heavy lifting. The open question is whether Polars will close this gap in its next major release, or whether DuckDB's architectural advantages will compound over time. We will be watching.

From Towards Data Science

Three years after a tie between Polars 0.18 and DuckDB 0.9, both 2.0 releases go head to head on datasets of up to 335 million records.

The post DuckDB 2.0 vs Polars 2.0 in Five Real-World Tests and One 14x Gap appeared first on Towards Data Science.

Read the original at Towards Data Science