-
Delete with loop and commit
Any tuning suggestion for this query? We run this every day to delete around 2 million rows(it is 10G)
BEGIN
LOOP
delete from table_name where
ntimestamp# (less than)trunc(sysdate-3)+6/24 and rownum <= 20000;
exit when SQL%rowcount = 0;
commit;
END LOOP;
commit;
END;
/
Note:When I put < it is not taking...that's why typed as 'less than' in the above
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|