Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NestedLoopJoin performance regression #12528

Closed
comphead opened this issue Sep 18, 2024 · 1 comment · Fixed by #12531
Closed

NestedLoopJoin performance regression #12528

comphead opened this issue Sep 18, 2024 · 1 comment · Fixed by #12531

Comments

@comphead
Copy link
Contributor

          This PR seems to introduce a performance regression due to the similar reasons as it was in https://github.com/apache/datafusion/pull/9830#issuecomment-2028430188 -- now `apply_batch_filter` may be executed way more times. Query used for the comparison:
EXPLAIN ANALYZE SELECT count(1) FROM nation n JOIN lineitem li ON n.n_nationkey < li.l_orderkey

and for the single partition execution I've got the following results:

-- Before:
NestedLoopJoinExec: join_type=Inner, filter=n_nationkey@0 < l_orderkey@1, metrics=[output_rows=150029850, build_input_rows=25, output_batches=733, build_input_batches=1, input_batches=733, input_rows=6001215, build_mem_used=296, join_time=1.257203344s, build_time=541.719µs]

-- After:
NestedLoopJoinExec: join_type=Inner, filter=n_nationkey@0 < l_orderkey@1, metrics=[output_rows=150029850, build_input_batches=1, input_batches=733, output_batches=733, input_rows=6001215, build_input_rows=25, build_mem_used=296, build_time=488.521µs, join_time=9.563931093s]

(join_time metric shows the issue).

Any thoughts on it?

Originally posted by @korowa in #12504 (comment)

@alihan-synnada
Copy link
Contributor

I'm working on a fix right now. I'll open a PR shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants