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

Re: Selectivity estimation for equality and range queries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Selectivity estimation for equality and range queries
Date: 2007-12-28 17:29:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
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

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

In response to


pgsql-hackers by date

Next:From: Trevor TalbotDate: 2007-12-28 19:54:55
Subject: Re: Spoofing as the postmaster
Previous:From: Andrew DunstanDate: 2007-12-28 17:14:42
Subject: Re: [HACKERS] Unworkable column delimiter characters for COPY

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group