I have encountered a problem recently. I cannot find the cause. please help me. thank you! A large number of such records have been found in mysql slow query logs recently & quot; # Time: 15062519: 02: 36 # User @ Host: admin [admin] @ [10.8.10.6] # Query_time: 4.962537Lock _ time: 0.20.50rows _ sent: 0Rows_examined: 1SETtimestamp1435230156; UPDATE 'Player... mysql update slowly queries the primary key
I have encountered a problem recently. I cannot find the cause. please help me. thank you!
A large number of such records have been found in mysql slow query logs recently.
# Time: 150625 19:02:36# User@Host: admin[admin] @ [10.8.10.6]# Query_time: 4.962537 Lock_time: 0.000050 Rows_sent: 0 Rows_examined: 1SET timestamp=1435230156;UPDATE `player` SET `last_login_time`=1435230010, `last_login_ip`='110.159.152.214', `last_login_line`=1, `online_flag`=1 WHERE id=124;
- Id is the primary key, InnoDB, and the table length is 4000 rows
- Lock_time, Rows_sent, and Rows_examined are not high, but Query_time is very high, and some of them exceed 10 seconds,
- On the contrary, if no index is added, Query_time is required to traverse the entire table for only 0.03 seconds.
- Persistent connections are used, and the total number of connections is 10-20.
- Traffic: about 10 M/hour for receiving and about 90 M/hour for sending
- Average mysql requests per second: 17
- Mysql versions 5.1.17 and 5.5.44 both have the same results.
- The server is configured with 8-core 16 GB, CentOS 6.5. cpu, memory, and io usage are not high, all of which are below 10%
- Multiple slow queries are frequently displayed at the same time.
Attachment:
Http://pan.baidu.com/s/1hq3tQDY
This is the current mysql running status, configuration parameters and some slow query logs
Please help me. I have been overwhelmed recently. thank you!