Details
-
Task
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
None
Description
storage/xtradb/dict/dict0dict.c:dict_stats_update_transient (ha_innobase::info_low 10.2) iterates over all indexes of a table to update the statistics.
Inside this loop the call to btr_estimate_number_of_different_key_vals fetches a different set of random pages for updating each index.
Since the pages are at random, taking the largest n_sample_pages of pages based on index size and using the same set of pages to calculating the statistics for all indexes will result in less pages retrieved and more accurate statistics (for indexes per table > 1).
Attachments
Issue Links
- relates to
-
MDEV-7084 innodb index stats inadequate using constant innodb_stats_sample_pages
- Closed
-
MDEV-7196 ANALYZE TABLE should do complete table scan
- Open
-
MDEV-10338 innodb_stats_traditional Equivalent for InnoDB Persistent Statistics
- Open