记一次SQL优化经历
一条慢SQL导致线上服务器CPU占用报警.具体如下:
SELECT * FROM video v RIGHT OUTER JOIN ( SELECT id FROM video USE INDEX(primary,idx_userid_status_createtime,channelId,createtime) WHERE 1 AND userid=223179 AND status IN ...
原创
2019-07-20 09:59:57 ·
468 阅读 ·
0 评论