Re: One tuple per transaction - Mailing list pgsql-performance

From Josh Berkus
Subject Re: One tuple per transaction
Date
Msg-id 200503121405.20943.josh@agliodbs.com
Whole thread Raw
In response to One tuple per transaction  ("Tambet Matiisen" <t.matiisen@aprote.ee>)
Responses Re: One tuple per transaction  (Hannu Krosing <hannu@tm.ee>)
List pgsql-performance
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

pgsql-performance by date:

Previous
From: "Tambet Matiisen"
Date:
Subject: One tuple per transaction
Next
From: "Tom Pfeifer"
Date:
Subject: Index use and slow queries