subqueries

From: Tomasz Grobelny <tomasz(at)grobelny(dot)oswiecenia(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: subqueries
Date: 2005-06-19 22:12:40
Message-ID: 200506200012.40736.tomasz@grobelny.oswiecenia.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Tomek

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sean Davis 2005-06-19 22:35:48 Re: subqueries
Previous Message Karl O. Pinc 2005-06-19 20:35:56 Re: Foreign key to a view (UNION of two or more tables),