Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C21319FB36F for ; Wed, 4 Oct 2006 10:45:22 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 04379-01 for ; Wed, 4 Oct 2006 10:45:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.metronet.co.uk (mail.metronet.co.uk [213.162.97.75]) by postgresql.org (Postfix) with ESMTP id 5B8A89FB316 for ; Wed, 4 Oct 2006 10:45:08 -0300 (ADT) Received: from mainbox.archonet.com (84-51-143-99.archon037.adsl.metronet.co.uk [84.51.143.99]) by smtp.metronet.co.uk (MetroNet Mail) with ESMTP id E61BD745BE; Wed, 4 Oct 2006 14:45:06 +0100 (BST) Received: from [192.168.1.17] (client17.office.archonet.com [192.168.1.17]) by mainbox.archonet.com (Postfix) with ESMTP id AE5CB15EA3; Wed, 4 Oct 2006 14:45:06 +0100 (BST) Message-ID: <4523BB75.9020200@archonet.com> Date: Wed, 04 Oct 2006 14:47:33 +0100 From: Richard Huxton User-Agent: Thunderbird 1.5.0.7 (X11/20060909) MIME-Version: 1.0 To: simon godden Cc: 'Postgresql Performance' Subject: Re: simple case using index on windows but not on linux References: <168519350610040048m7c4031e3t1a24b3fd4d9265a3@mail.gmail.com> <45237AD0.50604@enterprisedb.com> <168519350610040219n648a282hf159ff272e0f672a@mail.gmail.com> <45238085.3000407@archonet.com> <168519350610040240k346bd99fj9537822d79443f8c@mail.gmail.com> <45238F54.70609@archonet.com> <168519350610040635r4d041bd7vba47ca0e31a4c7d0@mail.gmail.com> In-Reply-To: <168519350610040635r4d041bd7vba47ca0e31a4c7d0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.486 tagged_above=0 required=5 tests=AWL, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200610/82 X-Sequence-Number: 21211 simon godden wrote: > I did that, e.g. initdb --locale=C, re-created all my data and have > exactly the same problem. > > I have two indexes, one with no options, and one with the varchar > operator options. > > So the situation now is: > If I do a like query it uses the index with the varchar options; > If I do a = query, it uses the index with no options; > If I do a < or > or any other operator, it reverts back to a seq-scan! > > I am on FC5 - any further ideas? Did I need to do anything specific > about collating sequence? I thought that the --locale=C would set > that for all options. From psql, a "show all" command will list all your config settings and let you check the lc_xxx values are correct. Make sure you've analysed the database after restoring, otherwise it will have bad stats available. -- Richard Huxton Archonet Ltd