2010YOUY01 commented on PR #27746: URL: https://github.com/apache/datafusion/pull/27746#issuecomment-7212961441
Update: I've identified some regressions and have a few ideas to address them. I may not get to them today, but will try to work on them over the next several days. There are several regressions. The worst is an IMDb query running 8% slower, while some TPC-DS/TPC-H queries are around 2% slower. The regressed join patterns can largely be characterized by: - Low probe hit rate. - Low build-side fanout (e.g., an average of two rows per distinct build key). The current implementation incurs the overhead of materializing and processing the `MatchHandles` array. This overhead is definitely worthwhile for high-fanout joins, and we already have a dedicated fast path for unique build keys. This leaves joins with very low but non-unique build-side fanout as a weak spot. I see two potential optimizations: 1. Avoid storing probe misses in `MatchHandleArray` (and unify it with `UniqueMatches` for simplicity). 2. Apply some conventional vectorization techniques to `GroupPosition::next_batch` to reduce the overhead of `MatchHandle` indirection. Regressed queries in hj/tpch/tpcds/JOB ```text IMDb24 / JOB7a +7.4% IMDb25 / JOB7b +4.0% IMDb26 / JOB7c +8.1% IMDb55 / JOB15d +2.6% IMDb69 / JOB19a +4.5% IMDb91 / JOB26a +1.3% IMDb100 / JOB29a +0.8% IMDb109 / JOB32a +2.8% TPCDS28 -0.1% TPCDS44 +2.4% TPCDS61 +0.2% TPCDS92 +2.1% TPCH11 +1.6% ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
