Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant