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: De-duplication of large table

Re: De-duplication of large table

From: Peter L <news_at_abc.freeserve.co.uk>
Date: Sat, 20 Nov 1999 20:38:15 -0000
Message-ID: <817852$6s1$3@news4.svr.pol.co.uk>


Dave wrote in message >...
>I have a 43,000,000 row table with about 225,000
>duplicate records.
>What is the easiest way to remove the duplicates.
>I want to remove one of every duplicate record
>from the table.
>

delete your_table
where rowid in (select min(rowid)

                        from  your_table
                        where  any_condition
                        group by (what columns determine 'duplicates')
                        having count(rowid) > 1);

I did something similar earlier in the week and it seemed to run a lot quicker than the other methods I tried. Received on Sat Nov 20 1999 - 14:38:15 CST

Original text of this message

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