Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Selectivity estimation for equality and range queries



Peter Eisentraut <peter_e(at)gmx(dot)net> 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 that includes the value used in the equality.

Not really --- LIKE estimation is only weakly related to range
estimation.

Relevant questions here include exactly which PG version is in use and
what's the database encoding/locale.  If it's not C locale, the fixes
I made in selfuncs.c during November might be relevant.

			regards, tom lane



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group