[MDEV-503] With use_stat_tables set to 'preferably' the server still uses non-persistent statistics for indexes in some cases Created: 2012-09-02  Updated: 2012-09-03  Resolved: 2012-09-03

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Igor Babaev Assignee: Igor Babaev
Resolution: Fixed Votes: 0
Labels: 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.



 Comments   
Comment by Igor Babaev [ 2012-09-03 ]

The fix was pushed into maria-5.5-mwl248.

Generated at Thu Feb 08 06:29:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.