Uploaded image for project: 'Percona Server'
  1. Percona Server
  2. PS-2485

LP #1629448: information_schema.index_statistics isn't populated for tokudb tables

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      **Reported in Launchpad by fimbulvetr last update 27-10-2016 18:06:55

      No index stats are written for tables that use the tokudb engine.

      While the test case is simple, this holds true for complex tables with billions of rows of data.
      [test]> create table test_innodb (id tinyint(3) not null primary key) engine=innodb;
      Query OK, 0 rows affected (0.03 sec)

      [test]> create table test_tokudb (id tinyint(3) not null primary key) engine=tokudb;
      Query OK, 0 rows affected (0.04 sec)

      [test]> insert into test_innodb values (1);
      Query OK, 1 row affected (0.01 sec)

      [test]> insert into test_innodb values (2);
      Query OK, 1 row affected (0.00 sec)

      [test]> insert into test_tokudb values (1);
      Query OK, 1 row affected (0.01 sec)

      [test]> insert into test_tokudb values (2);
      Query OK, 1 row affected (0.01 sec)

      [test]> flush index_statistics;
      Query OK, 0 rows affected (0.01 sec)

      [test]> select * from test_innodb where id = 1;
      ----

      id

      ----

      1

      ----
      1 row in set (0.00 sec)

      [test]> select * from test_tokudb where id = 1;
      ----

      id

      ----

      1

      ----
      1 row in set (0.00 sec)

      [test]> select * from information_schema.index_statistics;
      -----------------------------------------------------------+

      TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ

      -----------------------------------------------------------+

      test test_innodb PRIMARY 1

      -----------------------------------------------------------+
      3 rows in set (0.00 sec)

      [test]> select version();
      --------------

      version()

      --------------

      5.7.14-8-log

      --------------
      1 row in set (0.00 sec)

      [test]> show global variables like 'userstat';
      --------------------+

      Variable_name Value

      --------------------+

      userstat ON

      --------------------+
      1 row in set (0.00 sec)

        Smart Checklist

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                lpjirasync lpjirasync (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: