X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 6326252A52 for ; Sat, 12 Mar 2005 22:06:10 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 74502-05 for ; Sat, 12 Mar 2005 22:06:02 +0000 (GMT) Received: from davinci.ethosmedia.com (server227.ethosmedia.com [209.128.84.227]) by svr1.postgresql.org (Postfix) with ESMTP id B12DB531C8 for ; Sat, 12 Mar 2005 22:06:00 +0000 (GMT) X-EthosMedia-Virus-Scanned: no infections found Received: from [63.195.55.98] (account josh@agliodbs.com HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.1.8) with ESMTP id 7120931; Sat, 12 Mar 2005 14:07:52 -0800 From: Josh Berkus Organization: Aglio Database Solutions To: "Tambet Matiisen" Subject: Re: One tuple per transaction Date: Sat, 12 Mar 2005 14:05:20 -0800 User-Agent: KMail/1.6.2 Cc: References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200503121405.20943.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.012 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/212 X-Sequence-Number: 10917 Tambet, > In one of our applications we have a database function, which > recalculates COGS (cost of good sold) for certain period. This involves > deleting bunch of rows from one table, inserting them again in correct > order and updating them one-by-one (sometimes one row twice) to reflect > current state. The problem is, that this generates an enormous amount of > tuples in that table. Sounds like you have an application design problem ... how about re-writing your function so it's a little more sensible? -- Josh Berkus Aglio Database Solutions San Francisco