8000 If distinct count from stats is 0, do not use it in Join Order Optimizer by Tmonster · Pull Request #17466 · duckdb/duckdb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

If distinct count from stats is 0, do not use it in Join Order Optimizer #17466

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

Merged
merged 2 commits into from
May 15, 2025

Conversation

Tmonster
Copy link
Contributor

This causes bad join orderings when reading from scanners that provide 0 as a distinct count.
If a table truly has a distinct count of 0, then the cardinality is also 0, so falling back to the cardinality count is fine in this case.

@Mytherin Mytherin merged commit 3c0d466 into duckdb:main May 15, 2025
46 of 47 checks passed
@Mytherin
Copy link
Collaborator

Thanks!

krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 18, 2025
If distinct count from stats is 0, do not use it in Join Order Optimizer (duckdb/duckdb#17466)
[Python Dev] Guard against python exceptions when interacting with the `currentframe` object (duckdb/duckdb#17490)
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 19, 2025
If distinct count from stats is 0, do not use it in Join Order Optimizer (duckdb/duckdb#17466)
[Python Dev] Guard against python exceptions when interacting with the `currentframe` object (duckdb/duckdb#17490)
krlmlr added a commit to duckdb/duckdb-r that referenced this pull request May 19, 2025
If distinct count from stats is 0, do not use it in Join Order Optimizer (duckdb/duckdb#17466)
[Python Dev] Guard against python exceptions when interacting with the `currentframe` object (duckdb/duckdb#17490)
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 this pull request may close these issues.

2 participants
0