Search Postgresql Archives

time penalties on triggers?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux