Re: Planner problems in 8.2.4 and 8.2.5 (was: Possible planner bug/regression introduced in 8.2.5)

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Planner problems in 8.2.4 and 8.2.5 (was: Possible planner bug/regression introduced in 8.2.5)
Date: 2007-11-14 04:28:07
Message-ID: ba32cde09637513d52a866de0adbe922@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

Tom Lane replied:
> If there are 100 or more histogram entries it'll do the estimation by
> counting how many of the histogram entries match the pattern, rather
> than using the prefix-range-based estimator (which is pretty much
> all-fantasy anyway for a pattern with leading % :-().
>
> http://archives.postgresql.org/pgsql-committers/2006-09/msg00331.php

Ugh, that's some gotcha. Now that the patches are in place to fix the
planner problems, can I strongly recommend that a 8.2.6 version be made?
These are some serious planner problems, reported by real-world users,
and the only other option may be to go back to 8.1.

> I'm too lazy to go check, but I think the stats target is interpreted as
> the number of histogram bins rather than values, which is why you'd see
> the switchover at 99 not 100.

Can we switch the default_statistics_target to a default of 100? Is
there any reason not to do so at this point? Ten has always seemed
very low to me, and the 98/99 gotcha only makes the case for at
least 100 as the default stronger.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200711132325
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iD8DBQFHOnkKvJuQZxSWSsgRA9i/AJ4rN3BANdWKLmrscVpij0GiZ1i/lwCg4u4x
6U+7bTe2o60Kv44f+6n61Zc=
=MSBf
-----END PGP SIGNATURE-----

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2007-11-14 04:56:35 Re: Planner problems in 8.2.4 and 8.2.5 (was: Possible planner bug/regression introduced in 8.2.5)
Previous Message heasley 2007-11-14 01:22:01 Re: BUG #3728: pthread autoconf hangs