Re: Using ctid column changes plan drastically

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Using ctid column changes plan drastically
Date: 2012-07-24 14:23:01
Message-ID: 21308.1343139781@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Thomas Kellerer <spam_eater(at)gmx(dot)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?

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

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

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Torsten Zuehlsdorff 2012-07-24 14:23:19 Re: ZFS vs. UFS
Previous Message Greg Stark 2012-07-24 13:33:26 Re: Checkpointer split has broken things dramatically (was Re: DELETE vs TRUNCATE explanation)