Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 24E609FB308 for ; Fri, 2 Mar 2007 15:33:35 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 04436-05 for ; Fri, 2 Mar 2007 15:33:25 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from lists.commandprompt.com (host-254.commandprompt.net [207.173.203.254]) by postgresql.org (Postfix) with ESMTP id 9199E9FB2DE for ; Fri, 2 Mar 2007 15:33:26 -0400 (AST) Received: from perhan.alvh.no-ip.org (201-221-201-67.bk11-dsl.surnet.cl [201.221.201.67]) (authenticated bits=0) by lists.commandprompt.com (8.13.7/8.13.6) with ESMTP id l22JXNdm010529; Fri, 2 Mar 2007 11:33:24 -0800 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 35F6C32A1B; Fri, 2 Mar 2007 16:33:19 -0300 (CLST) Date: Fri, 2 Mar 2007 16:33:19 -0300 From: Alvaro Herrera To: Florian Weimer Cc: Alex Deucher , pgsql-performance@postgresql.org Subject: Re: strange performance regression between 7.4 and 8.1 Message-ID: <20070302193319.GA12629@alvh.no-ip.org> Mail-Followup-To: Florian Weimer , Alex Deucher , pgsql-performance@postgresql.org References: <82slco6n9t.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <82slco6n9t.fsf@mid.bfk.de> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: ClamAV version 0.88.5, clamav-milter version 0.88.5 on projects.commandprompt.com X-Virus-Status: Clean X-Greylist: Sender succeded SMTP AUTH authentication, not delayed by milter-greylist-1.6 (lists.commandprompt.com [192.168.2.159]); Fri, 02 Mar 2007 11:33:24 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.267 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200703/66 X-Sequence-Number: 23471 Florian Weimer escribió: > Locale settings make a huge difference for sorting and LIKE queries. > We usually use the C locale and SQL_ASCII encoding, mostly for > performance reasons. (Proper UTF-8 can be enforced through > constraints if necessary.) Hmm, you are aware of varchar_pattern_ops and related opclasses, right? That helps for LIKE queries in non-C locales (though you do have to keep almost-duplicate indexes). -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support