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 tables and then insert the raw data point into a 4th table.
> -----Original Message-----
> From: Pierre C [mailto:lists(at)peufeu(dot)com]
> Sent: Thursday, July 15, 2010 4:47 PM
> To: Benjamin Krajmalnik; pgsql-performance(at)postgresql(dot)org
> Subject: Re: [PERFORM] Question of using COPY on a table with triggers
> > Essentially, we insert a set of columns into a table, and each row
> > a trigger function which calls a very large stored procedure
> For inserting lots of rows, COPY is much faster than INSERT because it
> parses data (a lot) faster and is more "data-stream-friendly". However
> actual inserting into the tbale and trigger-calling has to be done for
> If the trigger is a "very large stored procedure" it is very likely
> executing it will take a lot more time than parsing & executing the
> INSERT. So, using COPY instead of INSERT will not gain you anything.
In response to
pgsql-performance by date
|Next:||From: Tom Lane||Date: 2010-07-16 00:24:46|
|Subject: Re: Question of using COPY on a table with triggers |
|Previous:||From: Pierre C||Date: 2010-07-15 22:57:28|
|Subject: Re: performance on new linux box|