From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
To: | Steven Dodd <steve(at)streetcontxt(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Does LC_CTYPE affect performance, index use? |
Date: | 2013-11-22 03:06:22 |
Message-ID: | 1385089582.15352.2.camel@vanquo.pezone.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, 2013-11-20 at 14:57 -0500, Steven Dodd wrote:
> I've read that setting LC_COLLATE to something other than "C" /
> "POSIX" negatively affects performance, and disables use of indexes
> for LIKE, etc...
It doesn't disable the use of indexes, you just need to create different
indexes.
> Does the same apply to LC_CTYPE?
Yes.
> I am considering setting LC_COLLATE = "C", and LC_CTYPE =
> "en_US.UTF-8", and using LOWER() to case-fold strings for sorting, and
> equality. The motivation for setting LC_CTYPE = "en_US.UTF-8", instead
> of "C", is to gain at least some degree of case-folding for
> international characters.
> Does this sound like a reasonable plan?
No, if you need internalized behavior, then set both LC_COLLATE and
LC_CTYPE to en_US.UTF-8 (or some other suitable locale) and check the
relevant documentation sections about how to create the right indexes.
From | Date | Subject | |
---|---|---|---|
Next Message | Ken Tanzer | 2013-11-22 03:49:38 | Re: Getting non_NULL right-side values on a non-matching join? |
Previous Message | Scott Marlowe | 2013-11-22 02:41:21 | Re: corruption issue after server crash - ERROR: unexpected chunk number 0 |