Update On Self Sorting

Previous Next

When flat files are created, Update On Self constraints are sorted internally.

For each Update On Self constraint, sorting is on the basis of:

How many other constraints this Update On Self potentially deactivates. This has a higher priority than:

How many other constraints this Update On Self potentially causes to be evaluated.

In other words, for each Update On Self that comes into play for a given row event, the number of other constraints potentially deactivated by this constraint determines the ranking of the constraint in the execution order. For constraints with the same ranking, those that cause evaluation of most others get the higher ranking.

From left to right, the following picture shows that Update On Self constraint occurrences are first sorted for optimization.

RE_clip0010

You can manually optimize by adding pre-conditions and post-conditions to constraint SQL statements where possible.

There is no overhead time for sorting and deactivation strategies because these Update On Self constraints have already been sorted in flat files.