Re: Question of using COPY on a table with triggers - Mailing list pgsql-performance

From Tom Lane
Subject Re: Question of using COPY on a table with triggers
Date
Msg-id 1005.1279239886@sss.pgh.pa.us
Whole thread Raw
In response to Re: Question of using COPY on a table with triggers  ("Benjamin Krajmalnik" <kraj@servoyant.com>)
List pgsql-performance
"Benjamin Krajmalnik" <kraj@servoyant.com> writes:
> That is what I thought.
> The trigger calls a 3000 row stored procedure which does all of the calculations to aggregate data into 3 separate
tablesand then insert the raw data point into a 4th table. 

Youch.  Seems like you might want to rethink the idea of doing those
calculations incrementally for each added row.  Wouldn't it be better
to add all the new data and then do the aggregation once?

            regards, tom lane

pgsql-performance by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Identical query slower on 8.4 vs 8.3
Next
From: Ryan Wexler
Date:
Subject: Re: performance on new linux box