ANALYZE TABLE complexity for
InnoDB tables is dependent on:
The number of pages sampled, as defined by
The number of indexed columns in a table
The number of partitions. If a table has no partitions, the number of partitions is considered to be 1.
Using these parameters, an approximate formula for estimating
ANALYZE TABLE complexity would be:
number of indexed columns in a table * number of partitions
Typically, the greater the resulting value, the greater the
execution time for
For more information about the
configuration parameter, see
Section 14.6.10, “Configuring Optimizer Statistics for InnoDB”.