Skip to content
  • Jorgen Loland's avatar
    82a641fb
    WL#6158: SORTING OF TABLES BEFORE GREEDY_SEARCH DOES NOT TAKE KEY · 82a641fb
    Jorgen Loland authored
             DEPENDENCY INTO ACCOUNT
    
    Earlier, the following algorithm was used to order tables 
    before doing greedy search: 
     1) Outer tables before inner tables 
        (as in "outer LEFT JOIN inner")
     2) Increasing number of expected rows 
    
    By taking key dependency into account when doing this 
    pre-sorting, greedy search will be able to considerably 
    reduce the number of plans because pruning is more likely
    to happen.
    
    In addition, merge and insert sort is implemented because
    the std::stable_sort implementation differs between platforms.
    This results in different QEPs which in turn is a problem for 
    mtr testing.
    82a641fb
    WL#6158: SORTING OF TABLES BEFORE GREEDY_SEARCH DOES NOT TAKE KEY
    Jorgen Loland authored
             DEPENDENCY INTO ACCOUNT
    
    Earlier, the following algorithm was used to order tables 
    before doing greedy search: 
     1) Outer tables before inner tables 
        (as in "outer LEFT JOIN inner")
     2) Increasing number of expected rows 
    
    By taking key dependency into account when doing this 
    pre-sorting, greedy search will be able to considerably 
    reduce the number of plans because pruning is more likely
    to happen.
    
    In addition, merge and insert sort is implemented because
    the std::stable_sort implementation differs between platforms.
    This results in different QEPs which in turn is a problem for 
    mtr testing.
Loading