• Sergei Golubchik's avatar
    MDEV-5698 Using ORDER BY in a FederatedX table is abnormally slow · e840d323
    Sergei Golubchik authored
    In ::position() federated needs to know an element before the
    current ("data_cursor") in the single-linked list. Replace list
    traversal for every ::position() call (which is O(n^2)) with remembering
    the current element before it's advanced by mysql_fetch_row().
    
    storage/federatedx/federatedx_io_mysql.cc:
      mdev:5698
    e840d323
federatedx_io_mysql.cc 15.9 KB