Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
ghx-label-4
Description
When searching a the cheapest join plan, a join may be inverted, this is safe for certain join operators. While join equality is symmetric, foreign key and primary key constraints are a directed relationship and therefore not always symmetric. So when inverting a join we can simple just swap the cost and cardinality for the left and right children as a change in order would affect any estimated fk/pk cardinality.