Tom Lane, 24.07.2012 16:23:
Thomas Kellerer <spam_ea...@gmx.net> writes:
DELETE FROM dupes
WHERE id NOT IN (SELECT min(b.id)
                   FROM   dupes b
                   GROUP BY first_name, last_Name
                   HAVING count(*) > 1);

Doesn't that kill the non-duplicates too?

Ah right - another good point on how important the correct test data is ;)

Why does the usage of the CTID column change the plan so drastically?

IIRC, type tid doesn't have any hash support.


So the "bad" plan is expected?

Regards
Thomas




--
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

Reply via email to