Application of work actions to database activities

One, and only one work action set can be applied to a database, a service superclass, or a workload.

When work is submitted to the data server, it is associated with a workload, either a user-defined workload or the default workload, then mapped to a service class.

The following figure shows the process of how a work action is applied to an activity.
Figure 1. Application of a work action to an activity
Application of a work action to an activity
A work action is assigned to an activity as follows:
  1. When an activity is mapped to a service superclass or a service subclass, the data server checks whether an enabled database-level work action set exists.
  2. If an enabled database-level work action set exists, the data server then checks whether the activity falls under any of the work classes in the work class set that the database-level work action set is associated with.
  3. If the activity falls under a work class and that work class has any work actions applied to it, those work actions are applied to the activity.
  4. The data server checks whether an enabled workload-level work action set exists. If it does, the data server then checks whether the activity falls under any of the work classes in the work class set that the workload-level work action set is associated with.
  5. If the activity falls under a work class and that work class has any work actions applied to it, those work actions are applied to the activity.
  6. Next, if the activity is mapped by the workload to a service superclass, the data server checks whether a work action set is applied to the service superclass.
  7. If a work action set is applied to the service superclass, the data server then checks whether the activity falls under any of the work classes in the work class set that the service superclass-level work action set is associated with.
  8. If the activity falls under a work class and that work class has any work actions applied to it, those work actions are applied to the activity.

Note that, if a mapping work action is applied to a stored procedure, then depending on whether the WITH NESTED or WITHOUT NESTED clause is specified in the work action definition, child activities of a stored procedure can run in the same service subclass or in different service subclasses than the parent activity.

In the following situations an activity is not affected by a work action set:
  • Activities fall in the default system (SYSDEFAULTSYSTEMCLASS) and default maintenance (SYSDEFAULTMAINTENANCECLASS) service classes.
  • Activities are assigned to the default administration workload, SYSDEFAULTADMWORKLOAD.
  • Activities are inside a load operation. The load operation itself does go through work action set evaluation.
  • Child activities of system stored procedures. The only exception is the SYSPROC.ADMIN_CMD stored procedure. Child activities of SYSPROC.ADMIN_CMD go through work action set evaluation.
  • The work action set is disabled.
  • The workload maps the activity directly to a service subclass.