From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marc Mitchell <marcm@eisolution.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Query performanc issue - too many table?
Date: Thu, 21 Nov 2002 14:45:11 -0500
Message-ID: <13938.1037907911@sss.pgh.pa.us> (raw)
In-Reply-To: <005501c2917f$61ca09a0$7c01050a@marcmdelltop>
References: <E26F84170D88D411B4AA002035AE9F0D03C0A174@lclntmx4.ngco.com>
<005501c2917f$61ca09a0$7c01050a@marcmdelltop>
"Marc Mitchell" <marcm@eisolution.com> writes:
> I am having a problem with the below SQL taking an extreme amount of time
> to run. The problem is that the explain looks great with all index scans.
> But the query itself takes minutes to run. The query contains 11 tables.
> We've found that by dropping any one table, performance reverts to being
> nearly instantaneous.
11 tables is the default GEQO threshold, so I'm wondering if the GEQO
planner is missing the best plan. It's hard to tell much though without
seeing plans for *both* queries you are comparing. EXPLAIN ANALYZE
output would be much more useful than just EXPLAIN, too.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, marcm@eisolution.com
Subject: Re: Query performanc issue - too many table?
In-Reply-To: <13938.1037907911@sss.pgh.pa.us>
References: <E26F84170D88D411B4AA002035AE9F0D03C0A174@lclntmx4.ngco.com> <005501c2917f$61ca09a0$7c01050a@marcmdelltop> <13938.1037907911@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