Author | Message |
---|---|
talisunep
Posts: 140
|
Posted 14:37 Nov 03, 2013 |
Professor
Last edited by talisunep at
15:27 Nov 03, 2013.
|
cysun
Posts: 2935
|
Posted 15:44 Nov 03, 2013 |
The short answer is yes, as one invocation of the trigger function is obviously better than multiple invocations, but just like everything else, it really depends. For example, if you try to implement the db class size trigger using a statement trigger, you'll realize that because you don't know which classes are affected (unlike in the row trigger function), you have to check all db classes, and that is a lot more expensive than what you do in the row trigger function. |
talisunep
Posts: 140
|
Posted 15:49 Nov 03, 2013 |
i was wondering if so, then does statement trigger exists as a default trigger in cases we can t apply row triggers? are there any cases/conditions we should use the statement trigger exclusively? |
cysun
Posts: 2935
|
Posted 15:55 Nov 03, 2013 |
When you can't solve the problem with a row trigger. But seriously, it's like asking how to get from point A to point B when you can walk, bike, drive, or take a bus. The answer is: evaluate the situation, pick the right solution. |