1

Different cardinality after each ALTER TABLE;

There is no new entries in this table. Same error on 10.3.8-MariaDB and 10.2.6 What could cause that?

Also have noticed that

Also this is strange too.

Ollie
  • 68
  • 9
  • Also looks like there is no such errors if i do the same on MySQL 5.6 – Ollie Jul 18 '18 at 15:07
  • 1
    The output from MySQL 5.6 would be helpful to see what you expect to see. The [InnoDB Persistent Statistics](https://mariadb.com/kb/en/library/innodb-persistent-statistics/) documentation does say that the value is only an estimation of rows and not an absolute measurement so slight variance would be expected. – markusjm Jul 18 '18 at 17:52
  • @markusjm increasing of innodb_stats_persistent_sample_pages helped to see normal Cardinality. Thanks for that link :) – Ollie Jul 19 '18 at 08:48
  • 1
    @markusjm Please post it as an answer. Otherwise people still click on the question and waste time on it, as it is not marked *Answered*. – kubanczyk Jul 19 '18 at 10:47

1 Answers1

2

Given that the InnoDB persistent statistics are only an estimate statistic, the values could be expected to change. Increasing innodb_stats_persistent_sample_pages should improve the accuracy.

markusjm
  • 316
  • 1
  • 6