使用insert into tablA select * from tableB语句时,一定要确保tableB后面的where,order或者其他条件,都需要有对应的索引,来避免出现tableB全部记录被锁定的情况。
来源:https://mp.weixin.qq.com/s/bvjH4Oe4M73D93NC-lC6XQ