Re: [SQL] Prolem wiht long query?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jérome Knöbl <jknobl(at)mandanet(dot)ch>
Cc: pgsql-sql(at)hub(dot)org
Subject: Re: [SQL] Prolem wiht long query?
Date: 1999-07-14 15:20:38
Message-ID: 25664.931965638@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

=?iso-8859-1?Q?J=E9rome=20Kn=F6bl?= <jknobl(at)mandanet(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message Steven Bradley 1999-07-14 15:50:23 Re: [SQL] WHERE clause?
Previous Message Tom Lane 1999-07-14 14:41:51 Re: [SQL] Few questions about my slow query