From: Tom Lane <tgl@sss.pgh.pa.us>
To: Willem Leenen <willem_leenen@hotmail.com>
Cc: pg@fastcrypt.com
Cc: pgsql-performance@postgresql.org
Subject: Re: performance regression with 9.2
Date: Mon, 12 Nov 2012 16:26:37 -0500
Message-ID: <8789.1352755597@sss.pgh.pa.us> (raw)
In-Reply-To: <DUB104-W27CF42182896D194898D798F6D0@phx.gbl>
References: <CADK3HHKA-JAs1Bno4=_956NnAoNZars60qU0PBiX7-gOnWnEaQ@mail.gmail.com>
<5518.1352753033@sss.pgh.pa.us>
<DUB104-W27CF42182896D194898D798F6D0@phx.gbl>
Willem Leenen <willem_leenen@hotmail.com> writes:
> To me, i see a mismatch between the optimizer and the actual records
> retrieved in the fast SQL as well, so plan instability is a realistic
> scenario.
Well, the rowcount estimates for a recursive union are certainly
pretty bogus, but those are the same either way. The reason this looks
like a bug and not just statistical issues is that the join inside the
recursive union is done as a hash, even though that's much more
expensive (according to the estimates, not reality) than a nestloop.
Presumably the planner is failing to even consider a
nestloop-with-inner-indexscan join there, else it would have picked that
type of plan. Why it's failing is as yet unclear.
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, willem_leenen@hotmail.com, pg@fastcrypt.com
Subject: Re: performance regression with 9.2
In-Reply-To: <8789.1352755597@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