• Monty's avatar
    MDEV-28073 Query performance degradation in newer MariaDB versions when using many tables · b729896d
    Monty authored
    The issue was that best_extension_by_limited_search() had to go through
    too many plans with the same cost as there where many EQ_REF tables.
    
    Fixed by shortcutting EQ_REF (AND REF) when the result only contains one
    row. This got the optimization time down from hours to sub seconds.
    
    The only known downside with this patch is that in some cases a table
    with ref and 1 record may be used before on EQ_REF table. The faster
    optimzation phase should compensate for this.
    b729896d
subselect_sj2_mat.result 68.5 KB