begin
astart := 1;
aend :=100000;
nend := 545776661;
i :=1;
begin
while astart < nend loop
delete /*+ parallel(a,8) */ From user a Where exists (Select 1 From user_dul_deleted_id b where a.id=b.id and b.id between astart and aend ) ;
commit;
dbms_output.put_line(to_char(astart)|| ' rows have been deleted ! total times :'|| to_char(i));
dbms_output.put_line('astart:'||to_char(astart));
dbms_output.put_line('aend:'||to_char(aend));
dbms_output.put_line('-----nend:'||to_char(nend));
astart := aend;
aend := aend + 100000;
i := i+1;
end loop;
end;
end;