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

From Christian Mock
Subject Re: performance with triggers depends on table size?
Date
Msg-id 20020813104116.GA12542@notemock.coretec.at
Whole thread Raw
In response to Re: performance with triggers depends on table size?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Mon, Aug 12, 2002 at 06:21:05PM -0400, Tom Lane wrote:

> > 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?

I don't think so -- in the test case, the stats table is at full size
after the second block of copying, and performance still decreases
thereafter. In the real database where I stumbled across this problem,
the stats table has less than 10 entries, and it is indexed (both in
the test case and in the real DB) on all necessary keys (I did an
explain on the selects in the trigger function and it was using an
index scan).

Regards,

cm.
--
Christian Mock                          Wiedner Hauptstrasse 15
Senior Security Engineer                1040 Wien
CoreTEC IT Security Solutions GmbH      +43-1-5037273

pgsql-general by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: [HACKERS] Linux Largefile Support In Postgresql RPMS
Next
From: Jan Theofel
Date:
Subject: age command