time penalties on triggers?
От | Jan Theodore Galkowski |
---|---|
Тема | time penalties on triggers? |
Дата | |
Msg-id | 1191523589.7753.1214187731@webmail.messagingengine.com обсуждение исходный текст |
Ответы |
Re: time penalties on triggers?
Re: time penalties on triggers? |
Список | 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 по дате отправления: