MySQL database executes analyze to collect information

MySQL TutorialThe column executes analyze to collect information. Introduction to the fault Before, a developer came to me and asked about a certain function of the application It was much slower than before, so the development provided slow SQL statements. I went to the corresponding MySQL database to look at the execution plan and found that the execution plan was incorrect. The first reaction was that the statistical information of one of the tables was inaccurate, resulting in the SQL statement The execution plan is wrong, from efficient query SQL to slow SQL. After locating the problem, it is natural to analyze and collect information again. At this time, all the selects on the analyze table suddenly get stuck and do not return any results. Then the application explodes, and various alarm messages are sent. Fault recovery At that time, the analyze operation was performed by a slave library, which was basically affected by the select query, so the query is simulated here operate. Create a simulation table mysql> select * from t_test_1; +—-+——–+——-+——–+ | id | name | name2 | status | +—-+——–+——-+——–+ | 1 | name1 | 1001 | 0 | | 2 | name1 | 1002 |…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索