[背景]
[RDS信息]
[解决思路]
insert my_table_temp select * from my_table where id>= 150000000 and id< 160000000;
RENAME TABLE my_table TO my_table_to_delete; RENAME TABLE my_table_temp TO my_table ; DROP TABLE my_table_to_delete;
[总结]
这种方案还是有些限制的,比如能段时间停服务,且有明确历史数据不会更新,否则可能需要添加trigger来解决了。
【版权申明】未经博主同意,谢绝转载!(请尊重原创,博主保留追究权)
https://www.cnblogs.com/cooqer/p/9139873.html
出自【Cooqer的博客】
原文:https://www.cnblogs.com/cooqer/p/9139873.html