• unknown's avatar
    MWL#89: Cost-based choice between Materialization and IN->EXISTS transformation · 8ec5e13f
    unknown authored
      Phase 3: Implementation of re-optimization of subqueries with injected predicates
               and cost comparison between Materialization and IN->EXISTS strategies.
    
    The commit contains the following known problems:
    - The implementation of EXPLAIN has not been re-engineered to reflect the
      changes in subquery optimization. EXPLAIN for subqueries is called during
      the execute phase, which results in different code paths during JOIN::optimize
      and thus in differing EXPLAIN messages for constant/system tables.
    - There are some valgrind warnings that need investigation
    - Several EXPLAINs with minor differences need to be reconsidered after fixing
      the EXPLAIN problem above.
    
    This patch also adds one extra optimizer_switch: 'in_to_exists' for complete
    manual control of the subquery execution strategies.
    8ec5e13f
item_subselect.h 40.1 KB