Subject Re: [ib-support] Question about trigger performance
Author Nando Dessena
Fabiano,

f> Let's suppose i have a trigger that verifies the integrity of the
f> inserted data.

f> For example, TABLE1 have one before insert trigger that verify some
f> other tables (see FORM 1 below) to see if data is consistent.

f> Will i loss performance if, instead of having one trigger that
f> verify all tables, i have various triggers, each one verifying 1
f> table (see FORM 2 below)?

I think your best bet is to verify it yourself in your configuration.
I'd expect minimal differences, but you never know.

f> create trigger t1 on table1
f> after insert
f> as
f> begin
f> if ( exists ( select * from table1 where ... ) then ...
f> if ( exists ( select * from table2 where ... ) then ...
f> end;

if these are not simple examples and you are really testing for
existence, then why not use DRI?

Ciao
--
Nando mailto:nandod@...