Re: performance with triggers depends on table size?

From: Christian Mock <cm(at)coretec(dot)at>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: performance with triggers depends on table size?
Date: 2002-08-13 10:41:16
Message-ID: 20020813104116.GA12542@notemock.coretec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message pginfo 2002-08-13 11:19:14 Very slow insert speed
Previous Message Oliver Elphick 2002-08-13 10:41:10 Re: [HACKERS] Linux Largefile Support In Postgresql RPMS