X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id D6F5AD1CCCC for ; Fri, 16 Apr 2004 14:01:42 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 00364-01 for ; Fri, 16 Apr 2004 14:01:36 -0300 (ADT) Received: from davinci.ethosmedia.com (server228.ethosmedia.com [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 4423CD1B515 for ; Fri, 16 Apr 2004 14:01:39 -0300 (ADT) Received: from [64.81.245.111] (HELO 192.168.1.102) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 4875322; Fri, 16 Apr 2004 10:03:02 -0700 From: Josh Berkus Reply-To: josh@agliodbs.com Organization: Aglio Database Solutions To: Ron St-Pierre , pgsql-performance@postgresql.org Subject: Re: Index Problem? Date: Fri, 16 Apr 2004 10:01:52 -0700 User-Agent: KMail/1.5.4 References: <40800CC2.3050707@syscor.com> In-Reply-To: <40800CC2.3050707@syscor.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404161001.52989.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/218 X-Sequence-Number: 6518 Ron, > The emp table has 60 columns, all indexed, about two-thirds are numeric, > but they are not affected by this update. The other 50+ columns are > updated in the middle of the night and the amount of time that update > takes isn't a concern. Well, I'd say that you have an application design problem, but that's not what you asked for help with ;-) > Late last night I dumped the table, dropped it and re-created it from > the dump (on the production server - when no one was looking). When I > re-ran the function it took almost 11 minutes, which was pretty much in > line with my results from the dev server. Sounds like you need to run a REINDEX on the table -- and after that, dramatically increase your max_fsm_pages, and run lazy VACUUM immediately after the batch update to clean up. -- -Josh Berkus Aglio Database Solutions San Francisco