Re: [GENERAL] trigger when clause

2012-04-12 Thread Andy Chambers
On Tue, Apr 10, 2012 at 5:10 PM, Jeff Davis wrote: > On Tue, 2012-04-10 at 16:15 -0400, Andy Chambers wrote: > > > Does anyone know the time complexity of the algorithm used to handle > > triggers with a when clause? > > It's done with a linear scan of all triggers, testing the WHEN clause > for

Re: [GENERAL] trigger when clause

2012-04-10 Thread Jeff Davis
On Tue, 2012-04-10 at 16:15 -0400, Andy Chambers wrote: > Does anyone know the time complexity of the algorithm used to handle > triggers with a when clause? It's done with a linear scan of all triggers, testing the WHEN clause for each. > To make this a little more concrete, what is likely to

[GENERAL] trigger when clause

2012-04-10 Thread Andy Chambers
Hi, Does anyone know the time complexity of the algorithm used to handle triggers with a when clause? To make this a little more concrete, what is likely to perform better a) A single trigger with "n" if/else clauses b) A set of "n" triggers each using a different when clause. What if n is 10?