Chinaunix首页 | 论坛 | 博客
  • 博客访问: 695256
  • 博文数量: 147
  • 博客积分: 5347
  • 博客等级: 大校
  • 技术积分: 1453
  • 用 户 组: 普通用户
  • 注册时间: 2005-06-06 11:11
文章分类

全部博文(147)

文章存档

2014年(4)

2012年(9)

2011年(5)

2010年(28)

2009年(21)

2008年(29)

2007年(15)

2006年(17)

2005年(19)

我的朋友

分类: Oracle

2008-09-05 09:20:58

有几张大的表,按月做分区处理,每月的数据量在2000万条左右,
现想做数据清理,只保留最近1个月的数据(测试环境)
若通过表数据删除,如:delete from ks38.tcl_his_done where busi_date<200601,
删除非常慢,删除动作运行了近12小时后,才把1年的数据清理完毕;但其中包含至少4年的数据,如何处理呢.
 
后通过
 
alter table ks38.tcl_his__done truncate partition p200601;
alter table ks38.tcl_his__done truncate partition p200604;
alter table ks38.tcl_his__done truncate partition p200603;
 
 
阅读(3376) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~