Open msirek opened 1 year ago
We have marked this issue as stale because it has been inactive for 18 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to CockroachDB!
Describe the problem When there is a foreign key constraint having predicates which are a superset of the join predicates, the row count estimate should be the same as scanning the foreign key child table. For example:
Since we know every combined value of
fk_child.a, fk_child.b
has a matching value offk_parent.a, fk_parent.b
, the estimated row count here should be 100,000 instead of 1.Jira issue: CRDB-21121