Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Deleting duplicates from 11 million records
If it's possible to stop people from inserting into the table, you might try
the create table x as select distinct tag_date, tag_time from large_table;
Then delete from the large table and copy the data from 'x' back.
OR if the table has to stay on line and users keep inserting: you could write a pl/sql block that copies the records from one table to the other but deletes from the large table after it has inserted into the new table. After the row has been inserted and deleted, commit the transaction (insert and delete).
Loop through the entire table, then you could do something like insert into large_table select distinct * from holding_table.
Dave Singh Received on Thu Jun 04 1998 - 18:22:00 CDT