Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 8C3D29FBC58 for ; Tue, 8 May 2007 12:04:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 38692-08 for ; Tue, 8 May 2007 12:04:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by postgresql.org (Postfix) with ESMTP id 144459FA197 for ; Tue, 8 May 2007 12:04:28 -0300 (ADT) Received: from vanquish.pgh.priv.collaborativefusion.com (vanquish.pgh.priv.collaborativefusion.com [192.168.2.61]) (SSL: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Tue, 08 May 2007 11:04:27 -0400 id 00056410.4640917B.00009815 Date: Tue, 8 May 2007 11:04:27 -0400 From: Bill Moran To: "Alexander Staubo" Cc: pgsql-performance@postgresql.org Subject: Re: specific query (not all) on Pg8 MUCH slower than Pg7 Message-Id: <20070508110427.c714d52f.wmoran@collaborativefusion.com> In-Reply-To: <88daf38c0705080759o2e5771c3qdf1b34baa581fc53@mail.gmail.com> References: <200705081418.l48EIY8V026360@larrys.harvard.edu> <1160.1178635705@sss.pgh.pa.us> <88daf38c0705080759o2e5771c3qdf1b34baa581fc53@mail.gmail.com> Organization: Collaborative Fusion X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.11; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/122 X-Sequence-Number: 24512 In response to "Alexander Staubo" : > On 5/8/07, Tom Lane 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