Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 887859FB43D for ; Tue, 3 Apr 2007 13:37:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 14274-02 for ; Tue, 3 Apr 2007 13:37:51 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.241]) by postgresql.org (Postfix) with ESMTP id E7B949FB518 for ; Tue, 3 Apr 2007 13:37:50 -0300 (ADT) Received: by an-out-0708.google.com with SMTP id c24so1755119ana for ; Tue, 03 Apr 2007 09:37:50 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=DlIdT0BAF6xRqkQ4D81SUnBC6NXHTRUZAl0A4f7c1oJd2eB6Pdd8JX/7XmHMKsoApX6ZEczf7R1jgkVxhoqn0gGbXqDw5lu4qggPHFvTvRqrPlue1+kvo2HJWkBX0vWX/KWJjuF/44RDBbEE7A50KTb726e5xQ8d4iMHhlA7zkE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jIoRvNwSXp+OukS9A1FJVuZueoRMdMVvSS1IR541Qy9ZiW5fiEgWMwEitkGYcJX+knnBOEIaKuQI8OTiJcUVHNF4yFyqK7Zrz0KzXvwjnayowWew9543w1U3+t7GX6dERWzJGilH0mbvVtypE08RuD/j890dU9XimBf5Qxui1Kk= Received: by 10.100.140.6 with SMTP id n6mr4568653and.1175618270044; Tue, 03 Apr 2007 09:37:50 -0700 (PDT) Received: by 10.100.247.7 with HTTP; Tue, 3 Apr 2007 09:37:49 -0700 (PDT) Message-ID: Date: Tue, 3 Apr 2007 12:37:49 -0400 From: "Alex Deucher" To: "Tom Lane" Subject: Re: postgres 7.4 vs 8.x redux: query plans Cc: "PostgreSQL Performance" In-Reply-To: <17931.1175578083@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <17931.1175578083@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/19 X-Sequence-Number: 23896 On 4/3/07, Tom Lane wrote: > "Alex Deucher" writes: > > and here are the query plans referenced in my last email (apologies if > > you get these twice, they didn't seem to go through the first time, > > perhaps due to size?). I cut out the longer ones. > > The first case looks a whole lot like 8.2 does not think it can use an > index for LIKE, which suggests strongly that you've used the wrong > locale in the 8.2 installation (ie, not C). > > The second pair of plans may look a lot different but in principle they > ought to perform pretty similarly. I think the performance differential > may at root be that string comparison is way more expensive in the 8.2 > installation, which again is possible if you went from C locale to some > other locale. > > In short: check out "show lc_collate" in both installations. OK, cool, the old one was C and the new one as not. So I dumped the DB and re-inited the DB with the locale set to C, then reloaded the dump, but I'm still getting the same behavior. Any ideas? Thanks, Alex > > regards, tom lane >