Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-503

With use_stat_tables set to 'preferably' the server still uses non-persistent statistics for indexes in some cases

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      If to start the server with use_stat_tables set to 'never' and to execute the EXPLAIN command for a join query that uses secondary indexes of an InnoDB database the optimizer will use records per key values provided by the engine, not by the persistent statistical table index_stat. This is correct.
      However, if after this to set use_stat_tables to 'preferably' and to run the same EXPLAIN the optimizer still will use records per key values provided by the InnoDB engine. And this is incorrect.
      Only after the FLUSH TABLES command is executed the optimizer starts using records per key values from the persistent tables.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            igor Igor Babaev added a comment -

            The fix was pushed into maria-5.5-mwl248.

            Show
            igor Igor Babaev added a comment - The fix was pushed into maria-5.5-mwl248.

              People

              • Assignee:
                igor Igor Babaev
                Reporter:
                igor Igor Babaev
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: