*************************** 1. row ***************************
Id: 123453
User: system user
Host:
db: chkk
Command: Connect
Time: 1456
State: Sending data
Info: INSERT INTO xx SELECT xxx
The above show processlist seems very strange. why the connect time cost so much time? Thanks to give your advice for it.
mysql performance
http://stackoverflow.com/questions/14207532/the-parameter-of-commandconnect-cost-lots-of-time-in-show-processlist-of-mysql
...全文
31414打赏收藏
mysql Command: Connect Time: 1456 花费时间很长,大家估计问题在哪里?
*************************** 1. row *************************** Id: 123453 User: system user Host: db: chkk Command: Connect Time: 1456 State: Sending data Info: INSERT INTO xx SELECT xxx The above show processlist seems very strange. why the connect
想像一下
1:在SALVE做一个超级大的查询,select * from XXX inner join b inner join c inner join d
2:INSERT INTO xxx 操作从MASTER传递到SLAVE,发现XXX被1锁住了,然后等待
3:等啊等啊,等了2年多,1终于完了,然后2开始执行。
User: system user
看起来这个是SLAVE拿到的SQL,
你测试出2S的,是在MASTER上还是SLAVE上的?
另外看看show processlist的时候,有没有别的操作锁住了你select的那个表。如果是MYISAM的话,表锁会导致别的进程没完成前,你这个SQL一直会处于等待状态。