pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Kellerer <spam_eater@gmx.net>
To: pgsql-performance@postgresql.org
Subject: Re: Using ctid column changes plan drastically
Date: Tue, 24 Jul 2012 16:54:18 +0200
Message-ID: <jumcuv$26n$1@dough.gmane.org> (raw)
In-Reply-To: <21308.1343139781@sss.pgh.pa.us>
References: <julsfr$otg$1@dough.gmane.org>
	<21308.1343139781@sss.pgh.pa.us>

Tom Lane, 24.07.2012 16:23:
> Thomas Kellerer <spam_eater@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






view thread (8+ messages)  latest in thread

Message-ID: <jumcuv$26n$1@dough.gmane.org>
Permalink:  ../jumcuv$26n$1@dough.gmane.org/
Also on:    postgresql.org/message-id/jumcuv$26n$1@dough.gmane.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: spam_eater@gmx.net
  Subject: Re: Using ctid column changes plan drastically
  In-Reply-To: <jumcuv$26n$1@dough.gmane.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox