← Back to team overview

enterprise-support team mailing list archive

[Bug 1394483] Re: innodb index stats inadequate using constant innodb_stats_sample_pages

 

So, this is essentially what's suggested in the patch (with new
variables to control behavior and tests to check all these):

...
+		/* New logaritmic number of pages that are estimated. We
+		first pick minimun from srv_stats_sample_pages and number of
+		pages on index. Then we pick maximum from previous number of
+		pages and log2(number of index pages) * srv_stats_sample_pages. */
 		if (index->stat_index_size > 0) {
-			n_sample_pages = index->stat_index_size;
+			n_sample_pages = ut_max(ut_min(srv_stats_sample_pages, index->stat_index_size),
+				                log2(index->stat_index_size)*srv_stats_sample_pages);
 		} else {
 			n_sample_pages = 1;
...

This may surely work better than default setting or even any one picked
by DBA based on some reasoning. So, I think we should consider this
feature seriously (for 5.5 and for tables that do not use persistent
statistics in 5.6).

** Also affects: percona-server/5.6
   Importance: Undecided
       Status: New

** Also affects: percona-server/5.5
   Importance: Undecided
       Status: New

** Changed in: percona-server/5.6
       Status: New => Confirmed

** Changed in: percona-server/5.5
       Status: New => Confirmed

** Bug watch added: MySQL Bug System #74935
   http://bugs.mysql.com/bug.php?id=74935

** Also affects: mysql-server via
   http://bugs.mysql.com/bug.php?id=74935
   Importance: Unknown
       Status: Unknown

** Tags added: contribution upstream

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/1394483

Title:
  innodb index stats inadequate using constant innodb_stats_sample_pages

To manage notifications about this bug go to:
https://bugs.launchpad.net/mysql-server/+bug/1394483/+subscriptions