• Evgeny Potemkin's avatar
    Bug#50843: Filesort used instead of clustered index led to · 2d4db52e
    Evgeny Potemkin authored
    performance degradation.
    
    Filesort + join cache combination is preferred to full index scan because it
    is usually faster. But it's not the case when the index is clustered one.
    
    Now test_if_skip_sort_order function prefers filesort only if index isn't
    clustered.
    
    mysql-test/r/innodb_mysql.result:
      Added a test case for the bug#50843.
    mysql-test/t/innodb_mysql.test:
      Added a test case for the bug#50843.
    sql/sql_select.cc:
      Bug#50843: Filesort used instead of clustered index led to
      performance degradation.
      Now test_if_skip_sort_order function prefers filesort only if index isn't
      clustered.
    2d4db52e
sql_select.cc 542 KB