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
Slowdown in ClickBench Q36-Q37 between DataFusion 43.0.0 and 44.0.0 #14481
SELECT"URL", COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-01'AND"EventDate"::INT::DATE<='2013-07-31'AND"DontCountHits"=0AND"IsRefresh"=0AND"URL"<>''GROUP BY"URL"ORDER BY PageViews DESCLIMIT10;
SELECT"Title", COUNT(*) AS PageViews FROM hits WHERE"CounterID"=62AND"EventDate"::INT::DATE>='2013-07-01'AND"EventDate"::INT::DATE<='2013-07-31'AND"DontCountHits"=0AND"IsRefresh"=0AND"Title"<>''GROUP BY"Title"ORDER BY PageViews DESCLIMIT10;
./datafusion-cli-44 -c "SELECT \"URL\", COUNT(*) AS PageViews FROM 'hits.parquet' WHERE \"CounterID\" = 62 AND \"EventDate\"::INT::DATE >= '2013-07-01' AND \"EventDate\"::INT::DATE <= '2013-07-31' AND \"DontCountHits\" = 0 AND \"IsRefresh\" = 0 AND \"URL\" <> '' GROUP BY \"URL\" ORDER BY PageViews DESC LIMIT 10; "
And made flamegraphs with
sudo flamegraph -- ./datafusion-cli-43 -c "SELECT \"URL\", COUNT(*) AS PageViews FROM 'hits.parquet' WHERE \"CounterID\" = 62 AND \"EventDate\"::INT::DATE >= '2013-07-01' AND \"EventDate\"::INT::DATE <= '2013-07-31' AND \"DontCountHits\" = 0 AND \"IsRefresh\" = 0 AND \"URL\" <> '' GROUP BY \"URL\" ORDER BY PageViews DESC LIMIT 10;
Here is DataFusion 43:
Here is DataFusion 44:
A largre amount of the time is spent decoding ParquetMetadata
Given how much time is spent decoding ParquetMetadata, maybe it would be good to add some sort of small built in cache for parquet metadata 🤔 I think @Ted-Jiang made hooks to do this a long time ago but we don't have anything in by default
Would love to help on this issue. We built something similar for Vortex based on moka and it also saves on roundtrips during infer_schema/infer_stats. It can probably be generalized in some way but I'm open to any thoughts you have.
You can see there are two APIs there for statistics and metadata but I don't know if they are still hooked up
We built something similar for Vortex based on moka
I think moka is likely overkill and too large a dependnecy for datafusion itself, but being able to connect up a moka based cache would be super helpful.
and it also saves on roundtrips during infer_schema/infer_stats.
Indeed -- and making the schema / stats more efficient in general would be really good
Activity
alamb commentedon Feb 4, 2025
I got flamegraphs from them using https://github.com/flamegraph-rs/flamegraph
Q36
./datafusion-cli-44 -c "SELECT \"URL\", COUNT(*) AS PageViews FROM 'hits.parquet' WHERE \"CounterID\" = 62 AND \"EventDate\"::INT::DATE >= '2013-07-01' AND \"EventDate\"::INT::DATE <= '2013-07-31' AND \"DontCountHits\" = 0 AND \"IsRefresh\" = 0 AND \"URL\" <> '' GROUP BY \"URL\" ORDER BY PageViews DESC LIMIT 10; "And made flamegraphs with
Here is DataFusion 43:
Here is DataFusion 44:
A largre amount of the time is spent decoding ParquetMetadata

alamb commentedon Feb 4, 2025
Also when I tried in DataFusion 45 (pre-release) the speed seems to have gotten better again...
alamb commentedon Feb 4, 2025
Given how much time is spent decoding ParquetMetadata, maybe it would be good to add some sort of small built in cache for parquet metadata 🤔 I think @Ted-Jiang made hooks to do this a long time ago but we don't have anything in by default
AdamGS commentedon Feb 25, 2025
Would love to help on this issue. We built something similar for Vortex based on moka and it also saves on roundtrips during infer_schema/infer_stats. It can probably be generalized in some way but I'm open to any thoughts you have.
alamb commentedon Feb 26, 2025
It can probably be generalized in some way but I'm open to any thoughts you have.
Thank you @AdamGS that would be amazing
I suggest the following:
Ideally 2 would use the existing APIs for doing this
The APIs I was referring to are:
You can see there are two APIs there for statistics and metadata but I don't know if they are still hooked up
I think moka is likely overkill and too large a dependnecy for datafusion itself, but being able to connect up a moka based cache would be super helpful.
Indeed -- and making the schema / stats more efficient in general would be really good
alamb commentedon Nov 4, 2025
I don't think this ticket is actionable so closing it down