Replies: 2 comments 1 reply
-
In versions 5+ it does. |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
See also issue #6992 (the Firebird 5.0 release notes only mention it in the Summary of New Features and it has no detailed section of its own). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Optimizer: Auto-convert LEFT JOIN to INNER JOIN when WHERE clause contains null-rejecting predicates
Problem
Firebird's optimizer does not recognize when a
WHEREclause effectively converts aLEFT JOINinto anINNER JOIN. When filtering on non-nullable columns from the right table (e.g.,B.ID = 1275), NULL rows from the outer join are eliminated, making the query semantically equivalent to anINNER JOIN. However, the optimizer still uses the less efficient outer join execution plan.Impact
This causes severe performance degradation:
This particularly affects:
Reproduction
Statistics
If you require further information, please let me know.
Proposed Solution
The optimizer should detect null-rejecting predicates in the
WHEREclause and internally rewrite the join. A predicate is null-rejecting when:B.column = value,B.column > value,B.column IS NOT NULLThis optimization is already implemented in other databases (PostgreSQL, MySQL, Oracle, SQL Server).
Environment
References
Beta Was this translation helpful? Give feedback.
All reactions