Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
Description
If to start the server with use_stat_tables set to 'never' and to execute the EXPLAIN command for a join query that uses secondary indexes of an InnoDB database the optimizer will use records per key values provided by the engine, not by the persistent statistical table index_stat. This is correct.
However, if after this to set use_stat_tables to 'preferably' and to run the same EXPLAIN the optimizer still will use records per key values provided by the InnoDB engine. And this is incorrect.
Only after the FLUSH TABLES command is executed the optimizer starts using records per key values from the persistent tables.