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

From Tom Lane
Subject Re: LIKE optimization in UTF-8 and locale-C
Date
Msg-id 3049.1174576088@sss.pgh.pa.us
Whole thread Raw
In response to LIKE optimization in UTF-8 and locale-C  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: LIKE optimization in UTF-8 and locale-C  (Hannu Krosing <hannu@skype.net>)
List pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Function cache regeneration
Next
From: "Luke Lonergan"
Date:
Subject: Re: TOASTing smaller things