Re: High cost of ... where ... not in (select ...)

From: Aaron Turner <synfinatic(at)gmail(dot)com>
To: pgsql-performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: High cost of ... where ... not in (select ...)
Date: 2009-06-16 23:39:15
Message-ID: 1ca1c1410906161639h62c97ddap58279ffe0a29e8a8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Jun 16, 2009 at 2:37 PM, Alvaro
Herrera<alvherre(at)commandprompt(dot)com> wrote:
> Aaron Turner escribió:
>> I'm trying to figure out how to optimize this query (yes, I ran vacuum/analyze):
>>
>> musecurity=# explain DELETE FROM muapp.pcap_store WHERE pcap_storeid
>> NOT IN (SELECT pcap_storeid FROM muapp.pcap_store_log);
>
> What PG version is this?

Doh, just realized I didn't reply back to list. It's version 8.3.3.

Also, pcap_storeid is unique in pcap_store_log

--
Aaron Turner
http://synfin.net/
http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
-- Benjamin Franklin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Robert Haas 2009-06-17 00:30:02 Re: High cost of ... where ... not in (select ...)
Previous Message Alvaro Herrera 2009-06-16 21:37:50 Re: High cost of ... where ... not in (select ...)