On 06-Jul-93 in One Big Rule or Many Small ..
>Is it generally better to have one large rule that fires a procedure
>with many "if" statements in it. Or to have many rules with "where"
>conditions that each fire smaller procedures? I would guess that if
>some of the "where" conditions only occur rarely while other "where"
>conditions occur frequently using a large procedure would tend to waste
>space in the QSF pool. However, I think there is some overhead involved
>when Ingres decides which rules need to be fired. Has anyone done any
>benchmarks? If not, is there any interest in any results I might obtain
>in this area?
I can't comment on which is method is better from practice - I've basically
used the one-procedure-with-many-ifs approach. A large example is a rule in
a database of mine that fires upon insert or update. The procedure invoked
by the firing of this rule tests 20+ conditions. I have not noticed any
overhead problems at all. From a maintainer's standpoint, I'd much rather
have one rule that invokes a procedure that tests many conditions then to have
many rules with conditions in them invoking a number of procedures. I would
be interested, though, in any results anyone might come up with.
Sr. Software Engineer (412) 268-2650 [office]
Administrative Computing and (412) 268-6868 [fax]
Carnegie Mellon University Office: UCC 155
4910 Forbes Avenue
Pittsburgh, PA 15213-3890
"Le Mieux! Le Magnifique! Soixante Six! Claude...NON!"
There are 1292 days until Clinton (Clinocchio) leaves office (1291 too many).