if you do not need partial data in the table you can just
truncate table table_name drop storage;
this will wipe out all the data in the table without using rollbacks.
if you have to remove 200 000 records and concerned about rollbacks you can write a loop:
LOOP
DELETE FROM table_name WHERE condition
AND ROWNUM <= 10000;
COMMIT;
EXIT WHEN SQL%rowcount < 10000;
END LOOP;
or
DELETE FROM table WHERE condition
AND ROWNUM <= 10000;
commit;
DELETE FROM table WHERE condition
AND ROWNUM <= 10000;
commit;
and keep going until all are deleted
thanks
Main Topics
Browse All Topics





by: andrewstPosted on 2003-05-04 at 07:05:32ID: 8455080
You will want an index on OJTCID, is there one?
Since ALL your data is duplicated, it may be easier to do this:
CREATE TABLE new_tabledummy AS
SELECT DISTINCT .....
FROM tabledummy;
Then drop the old table and rename the new one.
And for goodness sake, put a primary key constraint on OJTCID this time!