performance about trigger (after insert, update, delete)

Поиск
Список
Период
Сортировка
От Emi Lu
Тема performance about trigger (after insert, update, delete)
Дата
Msg-id 43E380BB.2020702@encs.concordia.ca
обсуждение исходный текст
Список pgsql-general
Hello,

I have a question about the performance of trigger/trigger functions.

For example, I had a trigger setup as :

*CREATE TRIGGER track_tableOperation AFTER INSERT OR UPDATE OR DELETE **ON tableName FOR EACH ROW** EXECUTE PROCEDURE
tracking_info(); 

A track table as:
( table_name, username,  updated_table_prim_key, time_stamp, action )
table_name:              which table is changed
username:                who does the change
updated_table_prim_key:  primary key column values
time_stamp:              default now()
action:                  added, deleted, updated, etc.
*

I have 50 tables, whenever there is a change (update, insert, delete) ,
I'd like to track this action and saved into my track table.

If I design triggers for all these 50 tables, whenever there are changes
for the table (Let's say users changed record values from GUI), a
trigger function is run and values are saved into track table
automatically.

I'd like to know the performance about the above way for tracking table
values updates. Your comments are very welcomed.

Emi



В списке pgsql-general по дате отправления:

Предыдущее
От: David Brain
Дата:
Сообщение: Re: Postgres 7.3.2 -> 8.1.2 upgrade performance issue
Следующее
От: David Brain
Дата:
Сообщение: Re: Postgres 7.3.2 -> 8.1.2 upgrade performance issue