Re: subqueries - Mailing list pgsql-general

From Tomasz Grobelny
Subject Re: subqueries
Date
Msg-id 200506201331.43499.tomasz@grobelny.oswiecenia.net
Whole thread Raw
In response to subqueries  (Tomasz Grobelny <tomasz@grobelny.oswiecenia.net>)
List 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

pgsql-general by date:

Previous
From: Milan Krcmar
Date:
Subject: External (asynchronous) notifications of database updates
Next
From: "Ilja Golshtein"
Date:
Subject: failed to find conversion function from "unknown" to ...