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 (View Workflow)
    • 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.

        Attachments

          Activity

            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: