Search Postgresql Archives

Re: C locale versus en_US.UTF8. (Was: String comparision in PostgreSQL)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 29, 2012 at 10:31:21AM -0700, Aleksey Tsalolikhin wrote:
> On Wed, Aug 29, 2012 at 9:45 AM, Merlin Moncure <mmoncure@xxxxxxxxx> wrote:
> > citext unfortunately doesn't allow for index optimization of LIKE
> > queries, which IMNSHO defeats the whole purpose.  to the best way
> > remains to use lower() ...
> > this will be index optimized and fast as long as you specified C
> > locale for your database.
> 
> What is the difference between C and en_US.UTF8, please?  We see that
> the same query (that invokes a sort) runs 15% faster under the C
> locale.  The output between C and en_US.UTF8 is identical.  We're
> considering moving our database from en_US.UTF8 to C, but we do deal
> with internationalized text.

Well, C has reduced overhead for string comparisons, but obviously
doesn't work well for international characters.  The single-byte
encodings have somewhat less overhead than UTF8.  You can try using C
locales for databases that don't require non-ASCII characters.

-- 
  Bruce Momjian  <bruce@xxxxxxxxxx>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux