A framework is provided within a database system for specifying database
monitoring rules that will be evaluated as part of the execution code
path of database events being monitored. The occurrence of a selected
database event triggers a rule that evaluates some parameter of an object
related to the event against a condition in the rule. If the condition is
met, a specified action is taken that can alter the execution of the
database event or database system performance. Lightweight aggregation
tables are utilized to enable aggregation of object parameter values so
that presently occurring events can be compared to a summary of the
object parameter values from previously occurring database events.
Signatures are assigned to queries based on the structure of the query
plan so that information in the lightweight aggregation tables can be
grouped according to query signature.