June 2018
Intermediate to advanced
478 pages
10h 52m
English
A work class set defines the characteristics of the work of interest, and a work action set dictates what happens when the work of interest is detected.
If you want to create a work class set and work action set to stop execution when Db2 detects a very high estimated cost, you can do so by using the CREATE WORK CLASS SET and CREATE WORK ACTION SET statements:
-- Creating work class set
CREATE WORK CLASS SET DIRECTSALES_QRY (WORK CLASS LONG_QRY WORK TYPE READ FOR
TIMERONCOST FROM 100000 TO UNBOUNDED);
-- Creating work action set
CREATE WORK ACTION SET DBACTIONS FOR DATABASE USING WORK CLASS SET DIRECTSALES_QRY
(WORK ACTION STOP_LONG_QRY ON WORK CLASS LONG_QRY
WHEN ESTIMATEDSQLCOST > 100000 COLLECT ACTIVITY ...Read now
Unlock full access