Re: statistics state
Posted by: Marko Mäkelä
Date: January 09, 2007 07:14AM
The InnoDB trx->op_info is "waiting in InnoDB queue" for each transaction you are listing. The string "statistics" is printed by innobase_mysql_print_thd() from thd->proc_info.
A quick grep of the MySQL source tree (which I am not very familiar with) reveals that the threads are probably stuck inside make_join_statistics(), called from JOIN::optimize(). I presume that the query optimizer needs to build some statistics in order to select a good execution plan.
When MySQL requests statistics (estimated numbers of distinct values for each key) from InnoDB, InnoDB will do some random dives to the index B-trees to give estimates. These estimates can be off or oscillate. It's in our long-term TODO to have persistent statistics.
Your problem looks like a MySQL issue, because trx->op_info would be set to something else if InnoDB were executing dict_update_statistics() [the random dives].
Please consider reporting a bug in the "Server" category. But try to prepare a test case, or otherwise the bug will probably end up flagged "Can't repeat".
With best regards,
Innobase Oy/Oracle Corp.
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.