标签:
1.由于delete语句删除数据时候,速度较慢
初始做法 delete from A where id in(select user_id from B);
其实 A表和B表之间有关联的
优化之后的做法是
delete a from A a inner join B b
on a.id = b.user_id
where b.team = ?
优化之后的做法执行效率很高
标签:
原文地址:http://www.cnblogs.com/hm-zhang/p/5822958.html