Re: LIKE without wildcard different from =

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: LIKE without wildcard different from =
Date: 2010-08-04 16:58:05
Message-ID: 21547.1280941085@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov> writes:
> To be clear, though, the problem isn't that it didn't turn a LIKE
> with no wildcard characters into an equality test, it's that it
> would have been three orders of magnitude faster (because of an
> available index with an opclass specification) if it had treated an
> equality test as a LIKE.

Ah. Well, the real fix for that is also in 8.4: we got rid of the
separate ~=~ operator, so a text_pattern_ops index is now usable
for plain =.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Kevin Grittner 2010-08-04 17:00:09 Re: LIKE without wildcard different from =
Previous Message Kevin Grittner 2010-08-04 16:52:24 Re: LIKE without wildcard different from =