Re: subqueries

From: Tomasz Grobelny <tomasz(at)grobelny(dot)oswiecenia(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: subqueries
Date: 2005-06-20 11:31:43
Message-ID: 200506201331.43499.tomasz@grobelny.oswiecenia.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 20 of June 2005 00:12, you wrote:
> 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.
Ok, postgresql wanted to be smarter that myself. It expanded the query instead
of executing them in order given by parenthesis. The solution (or just
workaround?) was to set two variables:
from_collapse_limit = 1
join_collapse_limit = 1

Tomek

In response to

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

Browse pgsql-general by date

  From Date Subject
Next Message Ilja Golshtein 2005-06-20 11:53:11 failed to find conversion function from "unknown" to ...
Previous Message Roman Neuhauser 2005-06-20 09:07:55 Re: subqueries