在做项目的时候我碰到了一个这样的场景,有两张表,数据都在300W左右,现在要求在生产环境中合并这两张表为一张表,本来想用sql语句insert into select来实现,后来发现这样操作速度很慢,因为里面有计算逻辑.大概的表结构如下: table1 id tel credits1 table2 id tel credits2 points 合并后的表为 table id tel credits points 其中credits = credits1 + credits2 我采用的实现方法是这…