一张表中有800万条记录;
想删除其中的一些过期记录;
该表无索引;
应该是分次delete, commit,还是可以直接delete?
如果是分次,每次删除多少为宜?

解决方案 »

  1.   

    1.先对这张表做一个备份,可以用EXP,以表的方式导出
    2.select count(*) from tablename where rownum<10000 and ....
    3.delete from tablename where rownum<10000 and ....
    4.commit;
    5.重复操作
      

  2.   

    第一步:可以先把表备份一下,然后导出表结构(便于以后重新建表)
    第二步:把你需要的、不过期的记录先导出来
    第三步:直接把表drop掉;
    第四步:重新建表;
    第五步:导入有效的数据,KO;
      

  3.   

    drop掉不行,如果那样的话关联的表的就出现问题了,
      

  4.   

    create table a as select * from b;
    truncate b;
    insert b as select * from a where