Re: performance with triggers depends on table size? - Mailing list pgsql-general

From Tom Lane
Subject Re: performance with triggers depends on table size?
Date
Msg-id 19147.1029190865@sss.pgh.pa.us
Whole thread Raw
In response to performance with triggers depends on table size?  (Christian Mock <cm@coretec.at>)
Responses Re: performance with triggers depends on table size?  (Christian Mock <cm@coretec.at>)
Re: performance with triggers depends on table size?  (Christian Mock <cm@coretec.at>)
List pgsql-general
Christian Mock <cm@coretec.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

pgsql-general by date:

Previous
From: "Peter Darley"
Date:
Subject: Vacuum problem
Next
From: Tom Lane
Date:
Subject: Re: Vacuum problem