今天需要捞出一张表的数据( xxId ),然后插入另一张表中,数据量比较大,200W,并且 xxId 会重复,需要去重之后再插入另一张表。
blog 喜欢可以 star hhh
1 mull 2020-02-20 19:43:59 +08:00 via Android 所以最后怎么解决的 |
![]() | 2 BBCCBB 2020-02-20 20:02:27 +08:00 你是来推销你的 github 的吧 |
![]() | 3 rekulas 2020-02-20 22:52:43 +08:00 直接导出 sql,选择一条数据一条语句,然后批量替换 insert into >> insert ignore into 新表 xxid unique 导入,应该就完了,一行代码都不用写 |
![]() | 4 heart4lor 2020-02-21 12:26:56 +08:00 最后还是通过 60 次全表 distinct 吗?有没有更优雅的办法 3L 似乎是个办法 |