Re: Use of subquery causes seq scan???

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Chris Hoover" <revoohc(at)sermonaudio(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Use of subquery causes seq scan???
Date: 2004-04-20 21:58:31
Message-ID: 22627.1082498311@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Chris Hoover" <revoohc(at)sermonaudio(dot)com> writes:
> Select *
> from table a
> where inv_num in (select inv_num from table b where ....)

> I'm running 7.3.4 on RedHat EL 2.1.

IN (SELECT) constructs pretty well suck in PG releases before 7.4.
Update, or consult the FAQ about rewriting into an EXISTS form.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Magnus Naeslund(t) 2004-04-20 22:47:49 Re: Wierd context-switching issue on Xeon
Previous Message Anjan Dave 2004-04-20 20:20:36 Moving postgres to FC disks