rust-query icon indicating copy to clipboard operation
rust-query copied to clipboard

Remove redundant table join when decorrelating subqueries that filter on equality

Open LHolten opened this issue 8 months ago • 1 comments

Currently, there is no special case for decorrelating a subquery that filters with an equality on something from the outer query. This results in a table join that can be optimized away. While it is technically possible for the database to optimize this join away if foreign key constraints are assumed to hold, this is not done by SQLite.

LHolten avatar May 15 '25 11:05 LHolten