阅读背景:

处理数百万行时,PDO DELETE意外地变慢

来源:互联网 

I'm working with a MYISAM table that has about 12 million rows. A method is used to delete all records older than a specified date. The table is indexed on the date field. When run in-code, the log shows that this takes about 13 seconds when there are no records to delete and about 25 seconds when there are 1 day's records. When the same query is run in mysql client (taking the query from the SHOW PROCESSLIST when the code is running) it takes no time at all for no records, and about 16 seconds for a day's records. I'm working with a MYISAM table that has about




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: