Re: LIKE optimization in UTF-8 and locale-C

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: LIKE optimization in UTF-8 and locale-C
Date: 2007-03-22 15:08:08
Message-ID: 3049.1174576088@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> I found LIKE operators are slower on multi-byte encoding databases
> than single-byte encoding ones. It comes from difference between
> MatchText() and MBMatchText().

> We've had an optimization for single-byte encodings using
> pg_database_encoding_max_length() == 1 test. I'll propose to extend it
> in UTF-8 with locale-C case.

If this works for UTF8, won't it work for all the backend-legal
encodings?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message andress calderon 2007-03-22 15:36:56 Hi, i want to contribute...
Previous Message Tom Lane 2007-03-22 15:05:52 Re: "Relation not found" error but table exits.

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-03-22 16:33:30 Re: contrib/spi makefile inconsistency
Previous Message Bruce Momjian 2007-03-22 14:41:46 Re: [HACKERS] Stats processor not restarting