| From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
|---|---|
| To: | Dmitri Bichko <dbichko(at)genpathpharma(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Subqueries and the optimizer |
| Date: | 2003-05-20 23:25:52 |
| Message-ID: | 20030520232552.GD2570@dcc.uchile.cl |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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"
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Phil Howard | 2003-05-21 00:01:02 | new mail server for PGSQL-GENERAL ? |
| Previous Message | Stephan Szabo | 2003-05-20 21:19:09 | Re: Subqueries and the optimizer |