• unknown's avatar
    MWL#89 · 5c4e64a5
    unknown authored
    Fixed query plans with loose index scan degraded into index scan.
    
    Analysis:
    With MWL#89 subqueries are no longer executed and substituted during
    the optimization of the outer query. As a result subquery predicates
    that were previously executed and substituted by a constant before
    the range optimizer were present as regular subquery predicates during
    range optimization. The procedure check_group_min_max_predicates()
    had a naive test that ruled out all queries with subqueries in the
    WHERE clause. This resulted in worse plans with MWL#89.
    
    Solution:
    The solution is to refine the test in check_group_min_max_predicates()
    to check if each MIN/MAX argument is referred to by a subquery predicate.
    5c4e64a5
group_min_max.test 52.9 KB