Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Duplicate rows
Presumably you have a delete statement that looks something like
DELETE FROM <table> t1
WHERE EXISTS(
SELECT 'x' FROM <table> t2 WHERE t1.<key> = t2.<key> AND t1.rowid < t2.rowid AND rownum = 1)
A non-unique index on the key fields should improve the performace of this query.
How did the non-unique data get in there in the first place? Is there any condition on t1 that you could use to cut down the number of rows that the driving query will return? If your are trying to delete 5000 out of millions of rows then this isn't going to be quick either.
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Computer Centre -
NIIPL
Sent: 02 June 2004 10:57
To: ORALCE LIST
Subject: Duplicate rows
Dear All,
One table is having more than 5000 duplicate record. We would like to remove all the duplicate records.
Using rowid method, it takes much time to execute.
Is there any other way to remove all the duplicate rows in a faster manner.
Regards,
Balu
This mail is scaned by eScan Anti Virus Software