• Sergei Petrunia's avatar
    MDEV-6384: It seems like OPTIMIZER take into account the order of indexes in the table · f1a16833
    Sergei Petrunia authored
    When ORDER BY ... LIMIT check whether it should switch from index IDX1
    to index IDX2, it should not ignore the fact that IDX2 may have a
    potential range or ref(const) access.
    Istead, it should calculate their costs: there is now a saved range
    optimizer cost and code to re-calculate what best_access_path()
    calculated for ref(const).
    
    /* in current cost model these two can be very different
    numbers unfortunately */
    f1a16833
innodb_ext_key.result 38.3 KB