Re: Using ctid column changes plan drastically

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Using ctid column changes plan drastically
Date: 2012-07-24 14:54:18
Message-ID: jumcuv$26n$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Tom Lane, 24.07.2012 16:23:
> 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?

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Maciek Sakrejda 2012-07-24 15:50:42 Re: Geoserver-PostGIS performance problems
Previous Message Ioannis Anagnostopoulos 2012-07-24 14:42:07 Re: Heavy inserts load wile querying...