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

INDEX_STATISTICS updated upon ANALYZE TABLE .. PERSISTENT ...

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.4(EOL), 10.5, 10.6, 10.11, 11.0(EOL), 11.1(EOL), 11.2(EOL), 11.4, 11.5(EOL)
    • 10.5, 10.6, 10.11, 11.4
    • Plugin - userstat
    • None

    Description

      ANALYZE TABLE .. PERSISTENT FOR .. INDEXES or FOR ALL shows up in INDEX_STATISTICS. I doubt it is meant to be so (although maybe there is no way to avoid it).

      SET @userstat.save= @@userstat;
      set global userstat= 1;
       
      create table t (a int, key(a)) engine=MyISAM;
      insert into t values (1),(2),(3),(4);
      flush index_statistics;
      analyze table t persistent for all;
      show index_statistics;
       
      # Cleanup
      set global userstat= @userstat.save;
      drop table t;
      

      10.4 d8249775980f9a6cb1a85e4799e1c1be452c2f2a

      flush index_statistics;
      analyze table t persistent for all;
      Table	Op	Msg_type	Msg_text
      test.t	analyze	status	Engine-independent statistics collected
      test.t	analyze	status	OK
      show index_statistics;
      Table_schema	Table_name	Index_name	Rows_read
      test	t	a	4
      

      Attachments

        Activity

          People

            monty Michael Widenius
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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