Re: like/ilike improvements - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: like/ilike improvements
Date
Msg-id 46F294F1.2080206@dunslane.net
Whole thread Raw
In response to Re: like/ilike improvements  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers

I wrote:
>
>
> I can't see an obvious way around the problem for multi-byte case - 
> lower() then requires converting to and from wchar, and I don't see a 
> way of avoiding calling lower().

There is one way we could reduce the use of lower() by up to (almost) 
50% in the common case where the pattern is a constant expression (or a 
literal, as it usually is) - cache the result of lower() on the pattern 
rather than call it for every text the pattern is being compared to. I'm 
not quite sure how to achieve that though.

Anyone have good ideas?

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Improving the Performance of Full Table Updates
Next
From: Tom Lane
Date:
Subject: HOT is applied