Re: Subqueries and the optimizer - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Subqueries and the optimizer
Date
Msg-id 20030520232552.GD2570@dcc.uchile.cl
Whole thread Raw
In response to Re: Subqueries and the optimizer  ("Dmitri Bichko" <dbichko@genpathpharma.com>)
List pgsql-general
On Tue, May 20, 2003 at 04:45:15PM -0400, Dmitri Bichko wrote:
> I wish it were as easy as a join - the query is much simplified for the
> purpose of the example, in reality the subselect is more complicated and
> includes a GROUP BY (which, at least as far as I know, makes subqueries
> the only way of doing this).

Note that IN (1,2) is quite different from IN (SELECT something), so if
your query is like the latter then you probably want to convert it to
EXISTS as shown in the FAQ.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La soledad es compañia"

pgsql-general by date:

Previous
From: Mike Mascari
Date:
Subject: Re: Subqueries and the optimizer
Next
From: Phil Howard
Date:
Subject: new mail server for PGSQL-GENERAL ?