DATATAGINSC threshold
The in-service-class DATATAGINSC threshold checks the data tag value of a table space or storage group accessed by an activity. Use this threshold to dynamically map an activity to a different Db2® service subclass based on which data is being accessed.
- Type
- Activity
- Definition domain
- Service subclass
- Enforcement scope
- Member
- Tracked work
- Recognized coordinator
- Queuing
- No
- Unit
- Data tag
- Predictive or reactive
- Reactive
Data can be tagged with a numeric value by specifying the DATA TAG attribute when creating or altering a table space or a storage group. Data tag thresholds are evaluated when a scan is first opened on a table and when an insert is performed into a table. Any new data tag thresholds picked up by the activity after a scan has been opened as a result of a remap operation is not applied to that scan.
Only the data tags for the data table spaces being
accessed in a query are considered by the threshold. The data tags
values for index or long table spaces are not considered during a
threshold evaluation. For example, if the query SELECT COUNT(*)
FROM T1
is index-only access with the index placed in a table
space with data tag 3 and the table data placed in a table space with
data tag 1, when the query is executed the threshold evaluation will
use data tag 1 (the data tag for the data table space). The data tag
threshold behavior is independent of the access method (index or direct
scan) chosen in the query access plan.
- Coordinator activities of type DML and corresponding subagent work (subsection execution).
- Nested DML activities that are derived from user applications. However, DML activities that are issued by the database manager, such as internal SQL statements are unaffected by this threshold.
In the following usage scenario, the user creates 3 table spaces; TBHIGH contains high priority data and has a data tag of 1, TBMED contains medium priority data and has a data tag of 4, and TBLOW contains low priority data and has a data tag of 9. The activities are initially mapped to a high priority service subclass. If any activities touch data on a table space other than that on the TBHIGH table space, the user wants the priority of those activities to drop. In the following example, a service superclass MAINSC containing three service subclasses, SCHIGH, SCMED, and SCLOW (for executing high, medium, and low priority work) have already been created.
CREATE THRESHOLD MAPTOMED FOR SERVICE CLASS SCHIGH UNDER MAINSC ACTIVITIES
ENFORCEMENT MEMBER WHEN DATATAGINSC NOT IN (1) REMAP ACTIVITY TO SCMED
CREATE THRESHOLD MAPTOLOW FOR SERVICE CLASS SCMED UNDER MAINSC ACTIVITIES
ENFORCEMENT MEMBER WHEN DATATAGINSC IN (9) REMAP ACTIVITY TO SCLOW
If
an activity touches a table space with a data tag of 9, that activity
will be remapped to SCMED, and then immediately remapped again to
SCLOW (due to the threshold on the SCMED service subclass). The user
in this case, will see two threshold violations.