pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Using ctid column changes plan drastically
Date: Tue, 24 Jul 2012 10:23:01 -0400
Message-ID: <21308.1343139781@sss.pgh.pa.us> (raw)
In-Reply-To: <julsfr$otg$1@dough.gmane.org>
References: <julsfr$otg$1@dough.gmane.org>

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?

> 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



view thread (8+ messages)  latest in thread

Message-ID: <21308.1343139781@sss.pgh.pa.us>
Permalink:  ../21308.1343139781@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/21308.1343139781@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, spam_eater@gmx.net
  Subject: Re: Using ctid column changes plan drastically
  In-Reply-To: <21308.1343139781@sss.pgh.pa.us>

* 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