Assignment of activities to work classes

If a work class set, through a work action set, is associated with a database, a workload, or a service superclass, then, just prior to execution in processing of an execute, execute immediate, or open request, or just before the execution of the load utility, the database activity is checked to determine if it matches any of the criteria specified in the work classes within the work class set.

The work classes are sorted within the work class set, by their evaluation order. Based on this evaluation order, the database activity is checked against each work class based on the attributes of the database activity (such as the activity type and cardinality) until there is a match or the list of work classes in the work class set has been exhausted.

Assume that the following work classes are in a work class set:
  • Evaluation order: 1; work class name: MyLoad; work class type: LOAD
  • Evaluation order: 2; work class name: SmallRead; work class type: READ; other attributes: estimated cost < 300 timerons
  • Evaluation order: 3; work class name: AllDML; work class type: DML
  • Evaluation order: 4; work class name: LargeRead; work class type: READ; other attributes: estimated cost > 301 timerons
  • Evaluation order: 5; work class name: MyDDL; work class type: DDL

If a SELECT statement with an estimated cost of 200 timerons is received, it is assigned to the SmallRead work class. If a DDL activity (such as CREATE TABLE) arrives, it is assigned the MyDDL work class. If a SELECT statement with an estimated cost of 500 timerons arrives, it is assigned to the AllDML work class because AllDML is positioned before the LargeRead work class. For more information, see Example: Working with a work class defined with the ALL keyword.