Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> How to make faster deletion on duplicated records?
Hi, all,
I tried the following two ways to delete duplicate records on a 5000 records table:
1). DELETE FROM Customer C WHERE C.rowid > ( SELECT MIN(X.rowid) FROM Customer X WHERE X.phone = C.phone); 2). CREATE TABLE temp AS
(SELECT * FROM Customer C
WHERE C.rowid > ( SELECT MIN(X.rowid) FROM Customer X WHERE X.phone = C.phone) ); DROP TABLE Customer; CREATE TABLE Customer AS
(SELECT * FROM temp);
DROP TABLE temp;
The second way is a little faster than the first one, but both of them took about 40 minutes to finish the deletion. Even after I indexed on the "phone" column, the performance is not improved.
Is there any better way to do that? Thanks. Received on Thu Mar 06 1997 - 00:00:00 CST
![]() |
![]() |