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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.