Re: LIKE optimization in UTF-8 and locale-C - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: LIKE optimization in UTF-8 and locale-C
Date
Msg-id 1174846699.3344.8.camel@localhost.localdomain
Whole thread Raw
In response to Re: LIKE optimization in UTF-8 and locale-C  (Andrew - Supernews <andrew+nonews@supernews.com>)
List pgsql-hackers
Ühel kenal päeval, R, 2007-03-23 kell 06:10, kirjutas Andrew -
Supernews:
> On 2007-03-23, ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> wrote:
> > Thanks, it all made sense to me. My proposal was completely wrong.
> 
> Actually, I think your proposal is fundamentally correct, merely incomplete.
> 
> Doing octet-based rather than character-based matching of strings is a
> _design goal_ of UTF8. Treating UTF8 like any other multibyte charset and
> converting everything to wide-chars is, in my opinion, always going to
> result in suboptimal performance.

Yes, that was what I meant by proposing a utf8 specific UTF8MatchText(),
which should not convert everything to wide char, but instead do
byte-by-byte comparison and just be aware of UTF encoding, where it is
easy to know how wide (how maby bytes/octets) each encoded character
takes.

-- 
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: BSD advertizing clause in some files
Next
From: Tom Lane
Date:
Subject: Re: datestyle GUC broken in HEAD?