Re: subqueries

From: "Sean Davis" <sdavis2(at)mail(dot)nih(dot)gov>
To: "Tomasz Grobelny" <tomasz(at)grobelny(dot)oswiecenia(dot)net>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: subqueries
Date: 2005-06-19 22:35:48
Message-ID: 000a01c5751f$3db81f80$5179f345@WATSON
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


----- Original Message -----
From: "Tomasz Grobelny" <tomasz(at)grobelny(dot)oswiecenia(dot)net>
To: <pgsql-general(at)postgresql(dot)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

In response to

  • subqueries at 2005-06-19 22:12:40 from Tomasz Grobelny

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tomasz Grobelny 2005-06-19 23:02:38 Re: subqueries
Previous Message Tomasz Grobelny 2005-06-19 22:12:40 subqueries