pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: T.H. <calinet6@gmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Question about subselect/IN performance
Date: Tue, 30 Nov 2010 18:23:56 -0500
Message-ID: <id412b$1le5$1@news.hub.org> (raw)
In-Reply-To: <4CF52C5F0200002500037FBA@gw.wicourts.gov>
References: <id3d3s$c8s$1@news.hub.org>
	<4CF52C5F0200002500037FBA@gw.wicourts.gov>

On 11/30/10 5:54 PM, Kevin Grittner wrote:
> "T.H."<calinet6@gmail.com>  wrote:
>
>> Also, are there any better ways you can think of doing such an IN
>> query, using non-subselect means that might be more efficient?
>
> Have you tried the EXISTS predicate?
>
> -Kevin
>

Just looking into it now, thanks for the suggestion. Is there a reason 
that EXISTS is generally faster than IN for this sort of query?

-Tristan



view thread (4+ messages)  latest in thread

Message-ID: <id412b$1le5$1@news.hub.org>
Permalink:  ../id412b$1le5$1@news.hub.org/
Also on:    postgresql.org/message-id/id412b$1le5$1@news.hub.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: calinet6@gmail.com
  Subject: Re: Question about subselect/IN performance
  In-Reply-To: <id412b$1le5$1@news.hub.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