Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
When computing the cost of any query plan the optimizer should take into account the cost of subquery predicates. Currently plan costs are computed with the assumption that all rows read by a plan belong to the tables contained directly in the plan (that is, the tables from all JOIN_TABs).
However, if a query plan contains subquery predicates, the evaluation
of these predicates contributes to the total cost and number of examined rows of the outer plan.
Not taking into account the additional cost of nested subqueries results in underestimating the cost of various execution methods.
For instance, for Q20 from DBT3 currently the optimizer chooses materialization instead of a much more efficient semi-join (when combined with mdev-83).
Attachments
Issue Links
- includes
-
MDEV-446 Reuse quick_condition_rows in fanout computations
- Closed