Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 3B9AB9FA31B for ; Fri, 2 Mar 2007 04:52:08 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 41843-06 for ; Fri, 2 Mar 2007 04:52:05 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mx01.bfk.de (mx01.bfk.de [193.227.124.2]) by postgresql.org (Postfix) with ESMTP id C46F29FA1BB for ; Fri, 2 Mar 2007 04:52:04 -0400 (AST) Received: from mx00.int.bfk.de ([10.119.110.2]) by mx01.bfk.de with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) id 1HN3Ug-0006jb-6B; Fri, 02 Mar 2007 09:52:02 +0100 Received: from fweimer by bfk.de with local id 1HN3Uc-00084T-6M; Fri, 02 Mar 2007 09:51:58 +0100 To: "Alex Deucher" Cc: pgsql-performance@postgresql.org Subject: Re: strange performance regression between 7.4 and 8.1 References: From: Florian Weimer Date: Fri, 02 Mar 2007 09:51:58 +0100 In-Reply-To: (Alex Deucher's message of "Thu, 1 Mar 2007 15:44:03 -0500") Message-ID: <82slco6n9t.fsf@mid.bfk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.051 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200703/49 X-Sequence-Number: 23454 * Alex Deucher: > I have noticed a strange performance regression and I'm at a loss as > to what's happening. We have a fairly large database (~16 GB). Sorry for asking, but is this a typo? Do you mean 16 *TB* instead of 16 *GB*? If it's really 16 GB, you should check if it's cheaper to buy more RAM than to fiddle with the existing infrastructure. > however the table structure is almost identical (UTF8 on the new one > vs. C on the old). 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.) --=20 Florian Weimer BFK edv-consulting GmbH http://www.bfk.de/ Kriegsstra=DFe 100 tel: +49-721-96201-1 D-76133 Karlsruhe fax: +49-721-96201-99