Re: [SQL] Prolem wiht long query? - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] Prolem wiht long query?
Date
Msg-id 25664.931965638@sss.pgh.pa.us
Whole thread Raw
In response to Prolem wiht long query?  (Jérome Knöbl <jknobl@mandanet.ch>)
List pgsql-sql
Jérome Knöbl <jknobl@mandanet.ch> writes:
> I have some trouble with a very long query.

The amount of time taken by the optimizer goes up exponentially with
the number of tables being joined.  If you are using a pre-6.5
version of Postgres then I'd recommend updating to 6.5; its optimizer
is considerably faster and less memory-hungry than prior releases.

You could also try reducing the GEQO threshold, which is the number
of tables at which the system stops trying to do exhaustive optimization
and changes to a heuristic planning method.
        regards, tom lane


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [SQL] Few questions about my slow query
Next
From: Steven Bradley
Date:
Subject: Re: [SQL] WHERE clause?