As noted in
Section 8.6, “Controlling Optimizer Statistics Estimation”,
the InnoDB storage engine allows you to control the way in which
InnoDB gathers information about the number of distinct values
in an index key. A related parameter,
innodb_stats_on_metadata
, has existed since MySQL release
5.1.17 to control whether or not InnoDB performs statistics
gathering when metadata statements are executed. See the MySQL
manual on
InnoDB
Startup Options and System Variables for details.
Beginning with release 1.0.2 of the InnoDB storage engine, it is
possible to change the setting of innodb_stats_on_metadata
dynamically at runtime with the command SET GLOBAL
innodb_stats_on_metadata=
,
where mode
is
either mode
ON
or OFF
(or
1
or 0
). Changing this
setting requires the SUPER
privilege and
immediately affects the operation of all connections.
This is the User’s Guide for InnoDB storage engine 1.1 for MySQL 5.5, generated on 2010-04-13 (revision: 19994) .