大数据量删除问题

一个大数据量删除问题:表中有1E5条数据  删除一个月前的数据(近7000w) 有比交快速的解决方法吗  目前只找到一种方法:存放在临时表后 再truncate 再insert

这种貌似也比较慢

1、create  table  newtable as select  * from oldtable where  cdate <= 20130201;
2、truncate table oldtable;
3、drop table oldtable;
4、rename table  newtable to oldtable;

猜你喜欢

转载自justice-jl.iteye.com/blog/1814781