Learn  /  Guides

DuckDB vs Polars vs Spark in 2026: which engine for your data, with benchmarks

All three shipped big releases in the last three weeks. We ran the same queries on the same machine and turned the results into a simple rule: which engine to reach for, and when Spark is still worth its overhead.

Guide10 min readUpdated 9 November 2026
PythonSQLDatabasesData analysis
All guides and cheat sheets

October 2026 was a busy month for data engines. DuckDB 2.0 arrived on 21 October as a long-term support release, Polars 2.1 followed on 25 October, and Apache Spark 4.3 on 30 October. All three are free and open source, all three read Parquet and Apache Iceberg, and all three now speak SQL. So which should you use? We installed the new versions, ran the same queries on the same 20 million rows, and wrote down what we learned.

0.20SecondsDuckDB, join and group-by on 20M rows
0.35SecondsPolars, group-by on 50,000 keys
5.3Secondsto start a local Spark session
1MillisecondDuckDB or Polars on a tiny query

Three engines, three designs

DuckDB 2.0

SQL database in a file
Licence
MIT
Style
SQL first, with Python, R, Java and Node clients
Runs
in your process, now also as a small server (Quack)
  • Excellent SQL: ASOF and NEAREST joins, triggers, MERGE, a fast VARIANT type for JSON
  • Reads Parquet, CSV, JSON, Iceberg, Delta and DuckLake, locally or from cloud storage
  • Long-term support until at least October 2027
  • One machine only; very large shuffles still need care

Best for SQL people, notebooks, dashboards backends and local analytics.

Polars 2.1

DataFrame library
Licence
MIT
Style
Python expressions, plus a growing SQL interface
Runs
in your process, with a streaming engine by default
  • Fast, strict and predictable: types and errors are explicit
  • Group-bys can spill to disk when memory runs out
  • Writes and manages Iceberg tables
  • Requires Python 3.11 or newer; some new APIs are marked unstable

Best for Python developers replacing pandas.

Spark 4.3

Distributed engine
Licence
Apache 2.0
Style
SQL, PySpark DataFrames, Scala and Java
Runs
on clusters, from Databricks, Fabric, EMR, Dataproc or your own
  • Scales across many machines, to hundreds of terabytes
  • Real-time streaming with state, now around 150 ms P99
  • The standard on Databricks and Microsoft Fabric
  • Seconds of start-up and per-query overhead on small data

Best when one machine is not enough.

The benchmark

We generated a Parquet file with 20 million sales rows (236 MB, four columns) and a small table of 1,000 stores, then ran two queries in each engine, reading the Parquet files every time. We report the fastest of three runs. The machine was a modest cloud VM with 2 CPU cores and 7 GB of memory, so absolute numbers will be higher or lower on yours; the ranking is what matters.

Revenue by product: group-by on 20M rows, 50,000 groups
Polars 2.10.35 s
DuckDB 2.00.39 s
pandas 3.11.03 s
Spark 4.31.25 s

Fastest of 3 runs. DuckDB 2.0.0, Polars 2.1.0, pandas 3.1.0, PySpark 4.3.0 in local mode with 2 cores. Each run reads the Parquet file.

Revenue by region: join with stores, then group-by
DuckDB 2.00.20 s
Polars 2.10.48 s
pandas 3.11.62 s
Spark 4.31.83 s

Same machine and method. The join adds 1,000 store rows to 20 million sales rows.

The pattern is clear. On a single machine, DuckDB and Polars are in a class of their own, and which one is faster depends on the query: Polars edged ahead on the many-groups aggregation, DuckDB was more than twice as fast on the join. pandas, which loads everything into memory first, was 2.5 to 8 times slower. Spark was the slowest here, but that is expected: it is built to spread work across many machines, and on two cores you mostly measure its coordination cost.

Small queries: where overhead shows

A tiny query: count rows by category in a 900-row file
0.9 msPolars
1.3 msDuckDB
53 msSpark, Feather on
85 msSpark, default

Spark 4.3's new Project Feather setting cut the tiny query from 85 to 53 ms by skipping the shuffle, a real improvement for testing code on samples. But DuckDB and Polars answer in about a millisecond, and starting a local Spark session took 5.3 seconds before any query ran. If your data fits on a laptop, that difference adds up all day.

Beyond speed

DuckDB 2.0Polars 2.1Spark 4.3
Main interfaceSQLPython expressionsSQL and PySpark
Bigger than memoryYes, spills to diskYes, streaming engine and spilling group-bysYes, across a cluster
Bigger than one machineNoNo (open source)Yes
StreamingNoBatch streaming of large filesYes, including real-time with state
Open table formatsIceberg, Delta, DuckLakeIceberg read and write, DeltaIceberg and Delta, the reference engine
Shared accessNew Quack server modeIn-process onlySpark Connect, multi-user clusters
AI coding agentsAgent mode in the CLI cuts output tokensClear errors, strict typesFeather speeds up the try-and-fix loop

How to choose

  1. 1

    Estimate your largest table

    Under about 100 GB of Parquet, a single machine with DuckDB or Polars is usually enough. Into the terabytes, or growing fast, plan for Spark or a cloud warehouse.

  2. 2

    Pick by the language your team thinks in

    SQL people will be productive in DuckDB within an hour. Python developers will prefer Polars expressions.

  3. 3

    Check where the job runs

    If your company is on Databricks or Microsoft Fabric, Spark is already there and managed, and small jobs can still use DuckDB or Polars inside the same notebooks.

  4. 4

    Need real-time? Use Spark

    Neither DuckDB nor Polars processes event streams with state. Spark 4.3 now does it with latency around a tenth of a second.

  5. 5

    Keep data in open formats

    Store tables as Parquet or Iceberg so you can switch engines later without migrating data.

Check your understanding

1/3In our join-and-group-by test on 20 million rows, which engine was fastest?

2/3When is Spark the right choice over DuckDB or Polars?

3/3What does Spark 4.3's Project Feather do?

Go deeper: DuckDB 2.0, Polars 2.1, Spark 4.3, the Polars cheat sheet and how to choose a database.

Sources: DuckDB 2.0.0 announcement (21 October 2026), Polars 2.1 release notes (25 October 2026) and Apache Spark 4.3.0 release notes (30 October 2026). Benchmarks are our own, run on 9 November 2026 on a 2-core, 7 GB cloud VM with synthetic data; they are indicative and not a substitute for testing your own workload.

Alessandro Ecclesie AgazziWritten by Alessandro Ecclesie Agazzi, analytics engineer in London. Updated 9 November 2026. About me

Found this useful?

New guides and "what's new" explainers on data and AI land here regularly. Follow along on LinkedIn, or share this one with a colleague.