-----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 [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200711132325
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

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



---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to