From: | Frank Joerdens <frank(at)joerdens(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Frank Joerdens <frank(at)joerdens(dot)de>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Multibyte encoding vs. SQL_ASCII vs. locales and European languages |
Date: | 2002-01-29 19:22:58 |
Message-ID: | 20020129202258.A18455@superfly.archi-me-des.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Jan 29, 2002 at 01:54:04PM -0500, Tom Lane wrote:
> Frank Joerdens <frank(at)joerdens(dot)de> writes:
> > What about the performance penalty that you're warned about with
> > locales (in the admin guide)?
>
> You pay it if you don't select C locale at initdb time, true.
>
> > Does multibyte support entail the same penalty?
>
> AFAIR, MULTIBYTE doesn't kill LIKE optimization, but it does incur
> a generalized performance penalty on all string-mashing operators.
> Never tried to measure the size of the penalty; perhaps Tatsuo or
> Hiroshi would know.
>
> > If not, then multibyte encoding, providing a superset of the
> > locale functionality (correct?), would be better than locales, right?
>
> MULTIBYTE is *not* a superset of LOCALE; they are independently
> enablable features. Offhand I don't think they are both interesting
> for the same character sets.
Ok. But a big advantage then of multibyte vs. locales would be that with
locales I get the performace hit for *all* databases that are hosted
under a particular Pg installation (because initdb settings affect all
databases), whereas with multibyte I get to choose, on a per-database
basis (via createdb or set server_encoding), when I want the locale
support, and when performance is more important.
This line of reasoning obviously only makes any sense if,
funcionality-wise, I don't lose anything by using multibyte instead of
locales (which is what I was trying to say by X provides a superset, in
terms of functionality, of Y . . . not that locale support and multibyte
support are related otherwise, e.g. by sharing bits of code).
Regards, Frank
From | Date | Subject | |
---|---|---|---|
Next Message | Frank Joerdens | 2002-01-29 19:39:01 | Re: Multibyte encoding vs. SQL_ASCII vs. locales and European languages |
Previous Message | Tom Lane | 2002-01-29 19:14:33 | Re: Multibyte encoding vs. SQL_ASCII vs. locales and European languages |