From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sami Dalouche <skoobi@free.fr>
Cc: pgsql-performance <pgsql-performance@postgresql.org>
Subject: Re: [Fwd: Re: Outer joins and Seq scans]
Date: Wed, 31 Oct 2007 18:05:16 -0400
Message-ID: <21628.1193868316@sss.pgh.pa.us> (raw)
In-Reply-To: <1193865739.23774.2.camel@samlaptop>
References: <1193865739.23774.2.camel@samlaptop>
Sami Dalouche <skoobi@free.fr> writes:
> -- For some reason, my message doesn't seem to go through the mailing
> list, so I am trying without any attachment
Please don't do that, at least not that way. These explain outputs have
been line-wrapped to the point of utter unreadability.
The main problem looks to me that you're trying to do a 25-way join.
You'll want to increase join_collapse_limit and maybe fool with the
geqo parameters. I fear you won't get a plan in a sane amount of time
if you try to do the full query as a single exhaustive search. You
can either raise join_collapse_limit all the way and trust geqo to
find a decent plan repeatably (not a real safe assumption unfortunately)
or raise both join_collapse_limit and geqo_threshold to some
intermediate level and hope that a slightly wider partial plan search
will find the plan you need.
It's also possible that you're just stuck and the outer join is
inherently harder to execute. I didn't study the query closely enough
to see if it's joining to any left join right-hand-sides, or anything
else that would forbid picking a nice join order.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, skoobi@free.fr
Subject: Re: [Fwd: Re: Outer joins and Seq scans]
In-Reply-To: <21628.1193868316@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox