Hi, I wrote a query to find duplicate records in my table, there are 5 coulumn based on that i have to find duplicate records.

the query is taking long time more than an hour to eexecute as the table size is huge.


can anyone give me alternate for this query which execute faster than this.

My SQL Query-

SELECT MEMBPLANGROUPHISTOID,
CALCIDENTIFIERDESCID,
DATEACCUMULATION,
ISDELETED,
DATEDELETED
FROM MEMBACCUMDATA
GROUP BY MEMBPLANGROUPHISTOID,
CALCIDENTIFIERDESCID,
DATEACCUMULATION,
ISDELETED,
DATEDELETED
HAVING COUNT(*)> 1