Oracle : Identifying duplicates in a table without index
Posted
by user288031
on Stack Overflow
See other posts from Stack Overflow
or by user288031
Published on 2010-03-22T20:38:30Z
Indexed on
2010/03/22
20:41 UTC
Read the original article
Hit count: 259
When I try to create a unique index on a large table, I get a unique contraint error. The unique index in this case is a composite key of 4 columns.
Is there an efficient way to identify the duplicates other than :
select col1, col2, col3, col4, count() from Table1 group by col1, col2, col3, col4 having count() > 1
The explain plan above shows full table scan with extremely high cost, and just want to find if there is another way.
Thanks !
© Stack Overflow or respective owner