Appearance
enable_join_elimination (boolean)
- Default value:
on
This configuration parameter controls whether the planner may remove INNER or LEFT OUTER joins based on declared PRIMARY KEY, FOREIGN KEY, or UNIQUE constraints.
When enabled, the planner uses declared constraints to determine that certain joins are unnecessary and eliminates them from the plan. This can improve performance because joins are often among the most expensive operations in SQL.
Important
- Yellowbrick does not enforce primary key, foreign key, or unique constraints.
- The planner assumes that all declared constraints are valid.
- If constraints are not valid, join elimination may produce wrong results.
See Join Elimination for detailed examples and risk scenarios.