I am running the following query to try and identify duplicates in my DB on a table
SELECT *
FROM
db.tablename x
JOIN db.tablename z
ON x.columnA = z.columnA
WHERE
x.columnB > z.columnB
However, it seems to be taking forever. i.e. just wondering whether this is a performance based issue or whether there is another way I can write this which will work faster ?
Thanks
If you just need to test, you can fetch only a couple of hundred records. For example