Re: specific query (not all) on Pg8 MUCH slower than Pg7 - Mailing list pgsql-performance

From Bill Moran
Subject Re: specific query (not all) on Pg8 MUCH slower than Pg7
Date
Msg-id 20070508110427.c714d52f.wmoran@collaborativefusion.com
Whole thread Raw
In response to Re: specific query (not all) on Pg8 MUCH slower than Pg7  ("Alexander Staubo" <alex@purefiction.net>)
List pgsql-performance
In response to "Alexander Staubo" <alex@purefiction.net>:

> On 5/8/07, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > You're not getting the indexscan optimization of the LIKE clause, which
> > is most likely due to having initdb'd the 8.1 installation in something
> > other than C locale.  You can either redo the initdb in C locale (which
> > might be a good move to fix other inconsistencies from the 7.3 behavior
> > you're used to) or create a varchar_pattern_ops index on the column(s)
> > you're using LIKE with.
>
> Given the performance implications of setting the wrong locale, and
> the high probability of accidentally doing this (I run my shells with
> LANG=en_US.UTF-8, so all my databases have inherited this locale), why
> is there no support for changing the database locale after the fact?
>
> # alter database test set lc_collate = 'C';
> ERROR:  parameter "lc_collate" cannot be changed

How would that command handle UTF data that could not be converted to C?

--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@collaborativefusion.com
Phone: 412-422-3463x4023

pgsql-performance by date:

Previous
From: "Alexander Staubo"
Date:
Subject: Re: specific query (not all) on Pg8 MUCH slower than Pg7
Next
From: Tom Lane
Date:
Subject: Re: specific query (not all) on Pg8 MUCH slower than Pg7