You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Analyze current ClickBench performance with DataFusion 52 #20601
As we work towards optimizing more for ClickBench we need to know what the current status is. We have our local bench.sh based benchmarking script but that doesn't perfectly mirror the actual results on https://benchmark.clickhouse.com
Describe the solution you'd like
I would like a clear analysis of where we are as well as perhaps some analysis of how well various optimziations are currently working
SELECT * FROM hits WHERE "URL" LIKE '%google%' ORDER BY "EventTime" LIMIT 10;
For this one we could do it probably faster by
SELECT * FROM hits WHERE (EventTime in (SELECT EventTime FROM hits WHERE "URL" LIKE '%google%' ORDER BY "EventTime" LIMIT 10) AND "URL" LIKE '%google%' ORDER BY "EventTime" LIMIT 10;
SELECT * FROM hits WHERE "URL" LIKE '%google%' ORDER BY "EventTime" LIMIT 10;
For this one we could do it probably faster by
SELECT * FROM hits WHERE (EventTime in (SELECT EventTime FROM hits WHERE "URL" LIKE '%google%' ORDER BY "EventTime" LIMIT 10) AND "URL" LIKE '%google%' ORDER BY "EventTime" LIMIT 10;
That is effectively the rewrite that DuckDB does for this query (it rewrites it into a join)
Activity
alamb commentedon Feb 27, 2026
I compared using duckdb / ClickHouse and DataFusion
First question -- do the results substantially vary across machine type?
Conclusion: no, the relative results are basically the same (DF is about 1.5x slower per the benchmarks)
I will therefore use a
c6a.2xlargeto continue experimentingc8g.4xlarge(16 vCPU, 32 GB RAM, ARM/Graviton)Leaderboard Link
c6a.4xlarge(16 vCPU, 32 GB RAM, Intel)Leaderboard Link
c6a.2xlarge(8 vCPU, 16 GB RAM)Leaderboard Link
c6a.xlarge(4 vCPU, 8 GB RAM)DataFusion Did not finish several queries
alamb commentedon Feb 27, 2026
It tuns out those results are for DataFusion 47.0.0
I got sucked into a several hour oddsey fixing the benchmarks scripts in
But I think it is mostly ready now
alamb commentedon Feb 28, 2026
Next I will plan to run the numbers for c6.2xlarge in 52.0.0 and 53.0.0 (main) and post the results
alamb commentedon Mar 1, 2026
I ran the numbers on a c6a.2xlarge; TLDR is they are looking good compared to DataFusion 47. Full results here: result.zip
Roughly 30% faster than with 47.
I will now analyze compared to latest DuckDB numbers
alamb commentedon Mar 2, 2026
I am now confident I have a reasonable ClickBench testing setup and can reproduce the
If you want to check it out, here is the result: result-53.zip (unzip and open index.html)
Some findings:
DataFusion 47 results are reproducible:
DataFusion vs DuckDB
Here is what the results for DataFusion 53 will look like compared to DuckDB:
The most obvious problem is Q23, our old friend
datafusion/benchmarks/queries/clickbench/queries/q23.sql
Line 4 in a5f490e
This will be resolved by turning on filter pushdown (w/ dynamic filters
filter_pushdown) by default #3463The next slowest is Q29
datafusion/benchmarks/queries/clickbench/queries/q29.sql
Line 4 in a5f490e
Where I think we will just have to hold our nose and implement the ClickBench special optimization 💩
SUM(..)clauses #15524I am not going to spend a lot more time reviewing results until we get morsel driven scan from @Dandandan over the line
alamb commentedon Mar 2, 2026
I am claiming analysis is complete and will mvoe on to improvements
Dandandan commentedon Mar 3, 2026
SELECT * FROM hits WHERE "URL" LIKE '%google%' ORDER BY "EventTime" LIMIT 10;For this one we could do it probably faster by
alamb commentedon Mar 10, 2026
That is effectively the rewrite that DuckDB does for this query (it rewrites it into a join)