X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 3699E9FCE17 for ; Mon, 28 Aug 2006 06:28:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 84628-09 for ; Mon, 28 Aug 2006 09:28:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.logix-tt.com (mail.logix-tt.com [212.211.145.186]) by postgresql.org (Postfix) with ESMTP id EC27D9FCE0F for ; Mon, 28 Aug 2006 06:28:01 -0300 (ADT) Received: from kingfisher.intern.logix-tt.com (p549D1A06.dip0.t-ipconnect.de [84.157.26.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.logix-tt.com (Postfix) with ESMTP id BA96C6597B; Mon, 28 Aug 2006 11:30:07 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by kingfisher.intern.logix-tt.com (Postfix) with ESMTP id 0C6291809DD49; Mon, 28 Aug 2006 11:28:24 +0200 (CEST) Message-ID: <44F2B737.7070301@logix-tt.com> Date: Mon, 28 Aug 2006 11:28:23 +0200 From: Markus Schaber Organization: Logical Tracking and Tracing International AG, Switzerland User-Agent: Thunderbird 1.5.0.4 (X11/20060713) MIME-Version: 1.0 To: Guillaume Cottenceau Cc: pgsql-performance@postgresql.org Subject: Re: perf pb solved only after pg_dump and restore References: <8764gd1dkz.fsf@meuh.mnc.lan> In-Reply-To: <8764gd1dkz.fsf@meuh.mnc.lan> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200608/421 X-Sequence-Number: 20606 Hi, Guillaume Guillaume Cottenceau wrote: > We noticed a slowdown on our application while traffic was kinda > heavy. The logics after reading the docs commanded us to trim the > enlarged tables, run VACUUM ANALYZE and then expect fast > performance again; but it wasn't the case[1]. What exactly do you mean with "trim the enlarged tables"? > Out of the blue, we dumped the database, removed it, recreated > from the restore, and now the performance is lightning fast > again. > > Does it look familiar to anyone? I thought running VACUUM ANALYZE > after a trim should be enough so that pg has assembled the data > and has good statistical knowledge of the tables contents.. This looks like either your free_space_map setting is way to low, or you have index bloat. Maybe a VACUUM FULL fullowed by a REINDEX will have solved your problem. It also might make sense to issue a CLUSTER instead (which combines the effects of VACUUM FULL, REINDEX and physically reordering the data). When the free_space_map is to low, VACUUM ANALYZE should have told you via a warning (at least, if your logging is set appropriately). HTH, Markus -- Markus Schaber | Logical Tracking&Tracing International AG Dipl. Inf. | Software Development GIS Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org