Re: subqueries - Mailing list pgsql-general

From Sean Davis
Subject Re: subqueries
Date
Msg-id 000a01c5751f$3db81f80$5179f345@WATSON
Whole thread Raw
In response to subqueries  (Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>)
Responses Re: subqueries  (Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>)
List pgsql-general
----- Original Message -----
From: "Tomasz Grobelny" <tomasz@grobelny.oswiecenia.net>
To: <pgsql-general@postgresql.org>
Sent: Sunday, June 19, 2005 6:12 PM
Subject: [GENERAL] subqueries


>I have such a statement:
> select * from (subquery1) as foo, (subquery2) as bar;
> Both subqueries are reasonably fast (<0.5s) and generate results that have
> several (<10) rows but the whole query takes forever to execute. Moreover
> if
> I simplify those subqueries (limiting functionality) the whole select
> clause
> works just fine. It seems that those subqueries are not executed
> separately.
> What am I doing wrong?

This is calling out for some EXPLAIN output (perhaps from the two subqueries
individually and then the full query).

Sean



pgsql-general by date:

Previous
From: Tomasz Grobelny
Date:
Subject: subqueries
Next
From: Tomasz Grobelny
Date:
Subject: Re: subqueries