time penalties on triggers? - Mailing list pgsql-general

From Jan Theodore Galkowski
Subject time penalties on triggers?
Date
Msg-id 1191523589.7753.1214187731@webmail.messagingengine.com
Whole thread Raw
Responses Re: time penalties on triggers?
Re: time penalties on triggers?
List pgsql-general
Does anyone know, or can anyone point to information about how much
triggers penalize inserts in PG tables?  I'm getting a report that it is
substantial, and before I investigate more.  The triggers in question
look like:
#
# CREATE OR REPLACE FUNCTION touch_lasttouched() RETURNS TRIGGER AS
$touch_lasttouched$
#   BEGIN
#     NEW.lasttouched = NOW();
#     RETURN NEW;
#   END;
# $touch_lasttouched$ LANGUAGE plpgsql;

#
# DROP TRIGGER IF EXISTS trigger_touch_ams_faults_data ON
ams_faults_and_failures_data;
#
# CREATE TRIGGER trigger_touch_ams_faults_data
#   BEFORE INSERT OR UPDATE
#   ON ams_faults_and_failures_data
#   FOR EACH ROW
#     EXECUTE PROCEDURE touch_lasttouched();
#

Here the "lasttouched" column of a table is like:
#
#    lasttouched TIMESTAMP(6)
#

and is intentionally left nullable.

pgsql-general by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: good sql tutorial
Next
From: Mike Ginsburg
Date:
Subject: Large Result and Memory Limit