Hi,

I have a table with four check constraints, which basically check 
logical conditions between its fields.

In order to enforce those constraints, Firebird creates behind the 
scenes two triggers for each one of them (I suppose one for update and 
the other for insert operation). So in this case it ends up with eight 
system created triggers.

I suppose this degradates performance of massive insert or updates, as 
four triggers have to be launched for each insert or update operation.

Does it have sense in order to enhace performance not to use check 
contraints but instead check those constraints globally using only two 
user defined triggers (before insert and before update), raising 
exceptions when logical conditions aren't met ?

Is it worthwhile ? Which are the pros and cons of this approach ?

Thanks for your opinion.

Aldo



------------------------------------

------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Visit http://www.firebirdsql.org and click the Documentation item
on the main (top) menu.  Try FAQ and other links from the left-side menu there.

Also search the knowledgebases at http://www.ibphoenix.com/resources/documents/ 

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/firebird-support/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo Groups is subject to:
    https://info.yahoo.com/legal/us/yahoo/utos/terms/

Reply via email to