Christian Mock <cm(at)coretec(dot)at> writes:
> I've got two identical tables, "input" and "output"; input is filled
> by an importing process, the data is processed and partially deleted,
> and the rest is copied to "output" by means of
> INSERT INTO output SELECT * FROM input
> What I noticed is that with triggers on the output table which update
> a statistics table, the time needed for that copying is more or less
> linearily dependant on the number of rows in the output table.
Perhaps what it's actually dependent on is the size of the stats table?
Do you have indexes on the stats table, and if so are they being used
by the trigger's queries?
regards, tom lane