From: Tom Lane <tgl@sss.pgh.pa.us>
To: Benjamin Krajmalnik <kraj@servoyant.com>
Cc: Pierre C <lists@peufeu.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Question of using COPY on a table with triggers
Date: Thu, 15 Jul 2010 20:24:46 -0400
Message-ID: <1005.1279239886@sss.pgh.pa.us> (raw)
In-Reply-To: <F4E6A2751A2823418A21D4A160B6898861470A@fletch.stackdump.local>
References: <F4E6A2751A2823418A21D4A160B68988614706@fletch.stackdump.local>
<op.vfwpkgx0eorkce@apollo13>
<F4E6A2751A2823418A21D4A160B6898861470A@fletch.stackdump.local>
"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 tables and 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, kraj@servoyant.com, lists@peufeu.com
Subject: Re: Question of using COPY on a table with triggers
In-Reply-To: <1005.1279239886@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox