• Sergey Petrunya's avatar
    MDEV-6888: Query spends a long time in best_extension_by_limited_search with mrr enabled · 94c8f335
    Sergey Petrunya authored
    - TABLE::create_key_part_by_field() should not set PART_KEY_FLAG in field->flags
      = The reason is that it is used by hash join code which calls it to create a hash
        table lookup structure. It doesn't create a real index.
      = Another caller of the function is TABLE::add_tmp_key(). Made it to set the flag itself.
    
    - The differences in join_cache.result could also be observed before this patch: one
      could put "FLUSH TABLES" before the queries and get exactly the same difference.
    94c8f335
sql_select.cc 746 KB