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

adv-cost-model: handle self joins #258

Open
skyzh opened this issue Dec 7, 2024 · 0 comments
Open

adv-cost-model: handle self joins #258

skyzh opened this issue Dec 7, 2024 · 0 comments

Comments

@skyzh
Copy link
Member

skyzh commented Dec 7, 2024

Currently we already return selectivity = 1 in this case. This doesn't sound entirely correct. Self join can be observed in many cases, either user query, or subquery unnesting. We will see a distinct scan joined with the original scan on the right side of the dependent join. Ideally, it should directly give back the row count of the scan instead of giving selectivity = 1 (which is row count * row count).

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

No branches or pull requests

1 participant