delday=20150831
count=`db2 "select count(*) from tabname where id <='$delday"0000000000"' with ur"`
count=`echo $count | awk '{print $3}'`
num=`expr $count / 10000`
num=`expr $num + 1`
i=1
while [ $i -le $num ]
do
db2 "delete from (select * from tabname where id <='$delday"0000000000"' fetch first 10000 rows only) with ur"
i=`expr $i + 1`
done
注意删除之后,高水位不会下降,还需要做reorg操作
阅读(544) | 评论(0) | 转发(0) |