Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Deleting duplicates from 11 million records

Re: Deleting duplicates from 11 million records

From: Dave S <DS_at_nospam.com>
Date: Thu, 4 Jun 1998 19:22:00 -0400
Message-ID: <6l7a7p$rv0$1@tor-nn1.netcom.ca>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US