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

Re: Problem (bug?) with like

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: drheart(at)wanadoo(dot)es, Lista PostgreSql <pgsql-general(at)postgresql(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Problem (bug?) with like
Date: 2001-12-28 18:35:41
Message-ID: 200112281835.fBSIZg129445@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > But what about '%A%' vs. '%AC%'.  Seems the second is reasonably
> > different from the first the our optimizer may be fine with that.  Is it
> > only when the strings get longer that we lose specificity?
> 
> Yeah, I don't think that the estimates are bad for one or two
> characters.  But the estimate gets real small real fast as you
> increase the number of match characters in the LIKE pattern.
> We need to slow that down some.

See my earlier email about the 50% idea for LIKE.  Do ordinary string
comparisons also have this problem?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2001-12-28 18:44:53
Subject: Re: psql misbehaves because of a simple typo
Previous:From: Bruce MomjianDate: 2001-12-28 18:27:26
Subject: Re: [HACKERS] Problem (bug?) with like

pgsql-general by date

Next:From: wsheldahDate: 2001-12-28 18:36:26
Subject: Re: First decent PostgreSQL CBT now on techdocs
Previous:From: Bruce MomjianDate: 2001-12-28 18:28:55
Subject: Re: First decent PostgreSQL CBT now on techdocs.postgresql.org

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