CDM Ruleframe slow performance during batch processing
We are using CDM Ruleframe (Headstart 6) in an Oracle 8.1.6
database for an application that serves both interactive "single
row" transactions from lots of Webform clients and massive batch
transactions. To make it even more complicated: both situations
will occur simultaneously.
Especially during batch processing (lots of inserts or lots of
inserts combined with lots of updates) our batch programs are
terribly slow when the CDM Ruleframe code layer is active. Even
disabling ALL business rules on ALL tables does not help at all.
Making the transactions from batch programs smaller (i.e.
commiting each 1000, 100, 10, 1 record(s)) does not help either.
After some sketchy research into this problem we think that most
of the performance loss during batch processing is caused by the
CDM Ruleframe "overhead" due to checking of ALL rules in "AFTER"
events. This explains why disabling ALL rules did not help.
Another example of this effect is deleting a large (>1000) number
of rows from a table without ANY delete rules. If the CDM
Ruleframe code layer is active this takes literally forever !
On the other hand, we do not see any performance problems if we
explicitly use the business rule functions in our batch programs
to perform the necessary validations with the CDM Ruleframe code
layer disabled.
Therefore at the moment we are using the following solution:
e.g. Before insert row TAPI trigger:
IF NOT <some global package variable>
THEN
CAPI/TAPI stuff
END IF; -- bulk
Before the batch programs do anything they set the "bulk" global
package variable to TRUE which causes adapted triggers to skip
all TAPI and CAPI code. Business rule functions that are
necessary for a specific batch program are called explicitly to
prevent business rule coding in several places. This approach
resulted in our case in a performance increase of about 600% !
Be aware, our approach to skip all the CDM Ruleframe overhead to
enable checking of ALL business rule in after events of course
only works when you do not need to check (some) business rules in
after events (e.g. mutating table situations), i.e. the business
rules that we need to check during batch processing can be
checked in BEFORE events !
After learning the hard way how CDM Ruleframe works in a batch
processing environment I have the following questions:
- Has anyone experienced the same performance problems using CDM
Ruleframe during batch processing ?
- Is there a different solution to this problem with similar
performance gains ?
- Why is it that the only possibility for disabling a business
rule or all business rules is just before the actual check will
be performed ? In other words, all the overhead to make the
actual check possible has already been done when CDM
Ruleframe finally notices that a specific business rule or all
business rules is/are disabled !
- Why is there almost no information (in CDM Ruleframe
documentation) about the usage of CDM Ruleframe in a batch
processing environment ?
Thank you for any suggestions in this matter,
Marcel.