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

INDEX_STATISTICS does not show data for FULLTEXT indexes

    XMLWordPrintable

Details

    Description

      FULLTEXT indexes are not included into INDEX_STATISTICS. Maybe it's intentional, in which case it needs to be reflected in the documentation (if it hasn't been yet).

      SET @userstat.save= @@userstat;
      set global userstat= 1;
       
      create table ft (c text,fulltext(c));
      insert into ft (c) values ('Once upon a time'),
        ('There was a wicked witch'),('Who ate everybody up');
       
      flush index_statistics;
      select * from ft where MATCH(c) AGAINST('wicked');
      show index_statistics;
      explain select * from ft where MATCH(c) AGAINST('wicked');
       
      # Cleanup
      set global userstat= @userstat.save;
      drop table ft;
      

      10.4 d8249775980f9a6cb1a85e4799e1c1be452c2f2a

      flush index_statistics;
      select * from ft where MATCH(c) AGAINST('wicked');
      c
      There was a wicked witch
      show index_statistics;
      Table_schema	Table_name	Index_name	Rows_read
      explain select * from ft where MATCH(c) AGAINST('wicked');
      id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
      1	SIMPLE	ft	fulltext	c	c	0		1	Using where
      

      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.