X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B42CE5E4714 for ; Wed, 1 Sep 2004 15:40:34 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 06534-07 for ; Wed, 1 Sep 2004 18:40:24 +0000 (GMT) Received: from mail.astudios.com (ns1.astudios.com [66.49.77.3]) by svr1.postgresql.org (Postfix) with ESMTP id CF0335E40AC for ; Wed, 1 Sep 2004 15:40:20 -0300 (ADT) thread-index: AcSQUyNdHD3uPjzPQJ2i6t3wPho+AA== Received: from [10.4.13.50] ([66.194.26.150]) by mail.astudios.com with Microsoft SMTPSVC(6.0.3790.0); Wed, 1 Sep 2004 14:40:22 -0400 Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.181 Message-ID: <4136178F.3060705@sermonaudio.com> Date: Wed, 01 Sep 2004 14:40:15 -0400 From: "Chris Hoover" User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040812) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Subject: Help understanding locale X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; format=flowed; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Sep 2004 18:40:22.0279 (UTC) FILETIME=[2356C170:01C49053] X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/10 X-Sequence-Number: 14713 I need some help understanding locales and what the impact upon my database/application would be. I am currently running 7.3.4 and have a database with tons of varchar fields. However, when we query on one of the fields with a like, it does not use an index. Apparently from the documentation, this is due to the locale not being set to C. The locale command gives me the following on my server: LANG=en_US LC_CTYPE="en_US" LC_NUMERIC="en_US" LC_TIME="en_US" LC_COLLATE="en_US" LC_MONETARY="en_US" LC_MESSAGES="en_US" LC_PAPER="en_US" LC_NAME="en_US" LC_ADDRESS="en_US" LC_TELEPHONE="en_US" LC_MEASUREMENT="en_US" LC_IDENTIFICATION="en_US" LC_ALL= I am just starting a project to do an upgrade to our application and looking at trying to fix this problem since it is affecting our performance. I have upgraded our dbserver to 7.3.7 (our next project is a major db upgrade to 7.4 or even 8), and created a new cluster with the locale specifically set to C (initdb --locale=C ...). This has fixed the index usage problem, but I don't understand what ramifications if any it has on my database. Please help me understand what this means to me as the dba. Thanks, Chris