Re: [HACKERS] Selectivity estimation for equality and range queries

2008-01-03 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Here is a narrowed down example. In what locale/encoding? Can we see the pg_stats row for person_idx_3? > PostgreSQL is version 8.1.9. So it hasn't got the LIKE estimation fixes I put in two months ago ... regards, tom lane

Re: [HACKERS] Selectivity estimation for equality and range queries

2008-01-03 Thread Peter Eisentraut
Am Freitag, 28. Dezember 2007 schrieb Tom Lane: > Peter Eisentraut <[EMAIL PROTECTED]> writes: > > I have been observing a case where the row count estimation for LIKE > > 'foo' is (much) higher than for LIKE 'foo%', the rest of the query being > > the same. This is a special case of the estimation

Re: [HACKERS] Selectivity estimation for equality and range queries

2007-12-28 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > I have been observing a case where the row count estimation for LIKE 'foo' is > (much) higher than for LIKE 'foo%', the rest of the query being the same. > This is a special case of the estimation for equality being higher than for a > range query th

[HACKERS] Selectivity estimation for equality and range queries

2007-12-28 Thread Peter Eisentraut
I have been observing a case where the row count estimation for LIKE 'foo' is (much) higher than for LIKE 'foo%', the rest of the query being the same. This is a special case of the estimation for equality being higher than for a range query that includes the value used in the equality. I have