SoftBase is committed to driving a better DB2 development experience. Combining decades of DB2 expertise, innovative testing and DB2 performance-tuning tools and an unmatched customer support and service team, SoftBase helps application developers and DB2 administrators deliver more reliable DB2 applications and create higher performing DB2 software.
Visit batch_healthcare_analyzer.php for more information!
5. SQL Job Performance Analysis
Select the Most Expensive Job
SoftBase Systems Batch Analyzer Version 3.1.0
=== SQL Performance Analysis (Jobs) ===
Command ===> Scroll ===> CSR
Filter: ON Intervals: OFF From: 08/11/11 To: 08/12/11 Loctn: DB8G
->
+--- RUN TIME ---+---CPU UTILIZED--+
Job Start | Job DB2 % | Job DB2 % | DB2 CPU% Total
Jobname Timestamp | Elapsed of Et | CPU of CPU | I all Jobs DB2 Cost
-------- ----------- -------- ------ -------- ------ -- -------- --------
_ HRBKUPQ2 08/12 19:33 06:04:56 58.3 04:30:08 52.9 -- 38.2 $8582.36
_ HRBKUPMO 08/12 03:11 04:51:07 63.2 02:55:00 68.4 -- 32.0 $7191.54
_ HRDLY001 08/12 18:36 00:55:18 96.5 00:34:37 95.4 -- 8.8 $1982.46
_ DLYRATEX 08/12 03:04 00:56:13 55.3 00:44:43 46.9 -- 5.6 $1259.18
_ HRBKUPMU 08/12 01:26 01:31:29
Select the most expensive 29.1 01:13:45 25.1 -- 4.9 $1111.53
DB2 Job to see 08/12 19:32 00:51:52
_ HRMTHLY2 Job Step 97.4 is the most expensive DB2 Job
00:14:46 95.2 -- 3.7 $ 843.96
What
performance.
_ HR430003 08/12 00:34 00:33:48 89.2 the last 24 hours? Job HRBKUPQ2 used
during 00:12:56 81.2 -- 2.8 $ 630.92
_ INVCMTH1 08/12 15:34 00:48:22 more than00:42:56
15.1 38% of all DB2 CPU during this time!
13.2 -- 1.5 $ 340.25
_ HR430001 08/12 13:14 00:18:12 16.8 00:16:18 15.0 -- 0.6 $ 147.46
_ HR430001 08/12 17:21 00:17:05 15.2 00:15:20 13.5 -- 0.5 $ 125.08
6. SQL Job Performance Analysis
Select the Most Expensive Step
SoftBase Systems Batch Analyzer Version 3.1.0
=== SQL Performance Analysis (Steps) ===
Command ===> Scroll ===> CSR
Filter: ON Intervals: OFF From: 08/11/11 To: 08/13/11 Loctn: DB8G
->
+-- RUN TIME --+-CPU UTILIZED-+ DB2
Step Start | Step DB2 %| Step DB2 %| CPU% Total
Jobname StepName Timestamp Elapsed of Et CPU CPU I Steps DB2 Cost
-------- -------- ----------- -------- ----- -------- ----- -- ----- --------
S HRBKUPQ2 HRBKUPDL 08/12 20:23 03:26:50 86.2 02:24:31 81.5 -- 82.4 $7075.64
_ HRBKUPQ2 HRBK00Z 08/13 00:31 01:07:00 16.8 01:01:03 16.2 -- 6.9 $ 593.73
_ HRBKUPQ2 HRBKUPQ2 08/12 23:54 00:37:20 24.6 00:34:29 22.6 -- 5.4 $ 468.02
_ HRBKUPQ2 HRBKUPMO 08/12 19:33 00:45:14 19.1 00:25:50 14.3 -- 2.6 $ 223.15
The most expensive steps
_ HRBKUPQ2 HRBKCHK2
Select the most expensive 08/12 23:50 00:03:21 99.0 00:02:34 first. Step --
are listed 99.7 1.7 $ 153.79
Step to see SQL
_ HRBKUPQ2 HRBKCHK 08/12 20:18 00:02:04 97.8 HRBKUPDL used 82.4% of
00:01:06 99.6 -- 0.7 $ 65.92
_statement performance.
HRBKUPQ2 HRBKUPN1 08/12 20:20 00:03:01 0.0 00:00:31 CPU. --
the DB2 0.0 0.0 $ 0.01
_ HRBKUPQ2 HRBK00X 08/12 23:53 00:00:07 33.3 00:00:03 68.8 -- 0.0 $ 2.11
7. SQL Job Performance Analysis
Select the Most Expensive Statement
SoftBase Systems Batch Analyzer Version 3.1.0
=== SQL Performance Analysis ===
Command ===> Scroll ===> CSR
Filter: ON Intervals: OFF From: 08/11/11 To: 08/13/11 Loctn: DB8G
Commands: S : Show SQL D : Dynamic SQL L : timeLine ->
Step Start Stmt Stmt DB2 CPU % Total
S Jobname Plan Package Timestamp Num Type I All Stmts Cost
- -------- -------- -------- ----------- ----- ----- --- --------- --------
S HRBKUPQ2 PDGF450 DLYRATEX 08/12 20:23 559 UPDAT - 94.5 $6687.90
_ HRBKUPQ2 PDGF450 DLYRATEX 08/12 20:23 446 OPEN - 2.8 $ 203.81
_ HRBKUPQ2 PDGF450 DLYRATEX 08/12 20:23 508 SELCT - 0.9 $ 70.53
_ HRBKUPQ2 PDGF450 DLYRATEX 08/12 20:23 The most expensive SQL 0.7
470 FETCH - $ 52.07
Select the most expensive DLYRATEX 08/12 20:23 statements are listed first. 0.5
_ HRBKUPQ2 PDGF450 520 SELCT - $ 39.28
_ HRBKUPQ2 for details. DLYRATEX 08/12 20:23 This UPDATE statement
SQL statement PDGF450 535 SELCT - 0.2 $ 20.69
_ HRBKUPQ2 PDGF450 DLYRATEX 08/12 20:23 400 FETCH -
used 94.5% of all DB2 0.0 $ 1.27
_ HRBKUPQ2 PDGF450 DLYRATEX 08/12 20:23 CPU in this batch
276 SELCT - 0.0 $ 0.10
program.
_ HRBKUPQ2 PDGF450 DLYRATEX 08/12 20:23 493 CLOSE - 0.0 $ 0.01
_ HRBKUPQ2 PDGF450 DLYRATEX 08/12 20:23 380 OPEN - 0.0 $ 0.01
8. SQL Job Performance Analysis
Actual Text of The Most Expensive Statement
SoftBase Systems Batch Analyzer Version 3.1.0 Row 1 of 3
Command ===> Scroll ===> CSR
JobName: HRBKUPQ2 Step: HRBKUPDL Program: DLYRATEX SSID: DB8G
Plan: PDGF450 Type: PACKAGE Collid: PDGF450DB8G
------------------------ Performance ----------------------------
CPU as pct of Elapsed.. 65.5 Total Cost..: $6687.90
SQL statement you Average Maximum Total %of Total
should tune first! --------- --------- --------- -----
Actual SQL Text is
Elapsed.Time... 0.013 6.710 10196.763 95.3 now displayed.
CPU Time....... 0.008 0.027 6687.897 94.5 Notice that the
Rows Affected.. 96 96 76800000 WHERE clause is
-------- SQL Text ( statement number: 559 ) ------------------- written to update
UPDATE ACCT_NOTES SET NOTE_TEXT2 = ALL account note
records instead of
:W-WORKING-STORAGE.W-NEW-INVC-NOTE WHERE CUST_N =
one.
:DCLACCOUNT.ACCT-CUST-N
9. Batch Throughput Analysis
Identifies Batch Contention Issues
SoftBase Systems Batch Analyzer Version 3.1.0
=== Batch Throughput Analysis (Jobs) ===
Command ===> Scroll ===> CSR
Filter: ON Intervals: OFF From: 08/11/11 To: 08/13/11 Loctn: DB8G
+--- RUN TIME ---+
Job Start | Job DB2 % | Deadlck Comt Chg Commit
Jobname Timestamp | Elapsed of Et | DB2 CPU I Timeout Cnt Pct Freqncy
-------- -----------|-------- ------ |-------- -- ------- ---- ----- --------
_ HRDLY001 08/12 03:04 00:01:41 91.9 ~ 0:00 -- 3 0 99.9 NO CMT
_ HRMTHLY2 08/12 03:04 00:01:05 94.6 ~ 0:00 -- 2 0 99.9 NO CMT
Displays DB2 batch jobs encountering
_ HRMTHLY2 08/12 03:09 00:01:05 94.7 ~ 0:00 -- 2 0 99.9 NO CMT
timeouts and deadlocks. Job HRDLY had 3
_ HRMTHLY2 08/12 19:32issued no COMMITS during
timeouts, and 00:51:52 97.4 00:14:46 -- 1 133 96.1 00:00:23
_ HR430003 08/12 00:34 execution.
00:33:48 89.2 00:12:56 -- 0 0 91.7 NO CMT
_ MTHBILLN 08/12 00:36 00:30:33 16.6 00:15:01 -- 0 0 0.0 NO CMT
_ HRBKUPMU 08/12 01:26 01:31:29 29.1 01:13:45 -- 0 2601 13.1 00:00:02
Chg Pct is a critical number – it is the
_ HRBKUPMO 08/12 03:11 04:51:07 63.2 02:55:00 -- 0 1601 88.6 00:00:10
percent of time, out of all I/O, that
_ ACCTHIST 08/12 11:54 00:09:23 programs 0.0 00:03:42 --
are changing DB2 data. 0 0 0.0 NO CMT
_ MTHBILL3 08/12 13:03 00:06:55 10.8 00:06:20 -- 0 0 0.0 NO CMT
10. Recovery Impact Analysis
Identifies Potential Rollbacks
SoftBase Systems Batch Analyzer Version 3.1.0
=== Recovery Impact Analysis (Jobs) ===
Command ===> Scroll ===> CSR
Filter: ON Intervals: OFF From: 08/11/11 To: 08/13/11 Loctn: DB8G
+-- RUN TIME---+
Job Start | Job DB2 %| Deadlck Chg Comit Commit Rollback
Jobname Timestamp |Elapsed of Et| I Timeout Pct Cnt Frequncy Estimate
-------- -----------|-------- -----|-- ------- ----- ----- -------- --------
_ HRBKUPQ2 08/12 19:33 06:04:56 58.3 -- 0 80.7 2601 00:00:08 05:39:53
_ HRBKUPMO 08/12 03:11 04:51:07 63.2 -- 0 88.6 1601 00:00:10 05:26:30
_ HR430003 08/12 00:34 00:33:48 89.2 -- 0 91.7 0 NO CMT 00:55:22
_ DLYRATEX 08/12 03:04 00:56:13 55.3 -- 0 56.8 1601 00:00:02 00:35:22
_ The Recovery Impact Analysis Report 91.9 --
HRDLY001 08/12 03:04 00:01:41 3 99.9 0 NO CMT 00:01:03
provides an estimate of how long each
_ HRMTHLY2 08/12 03:09 00:01:05 94.7 -- 2 99.9 0 NO CMT 00:01:03
DB2 batch program will require to
_ HRMTHLY2 08/12 19:32 00:51:52 97.4 --
ROLLBACK any changes it has made 1 96.1 133 00:00:23 00:01:03
_ HRMTHLY2 08/12 COMMIT statement.
since the last 03:04 00:01:05 94.6 -- 2 99.9 0 NO CMT 00:01:02
_ HR430002 08/12 17:46 00:47:59 1.0 -- 0 86.4 1 00:47:59 00:00:51
_ HRDLY001 08/12 18:36 00:55:18 96.5 -- 0 97.9 300 00:00:11 00:00:42
11. SoftBase Batch Analyzer Installation
Batch Analyzer Installation Procedure
Installation time is usually maximum of 1 – 2 hours
DB2 DBA performs the Batch Analyzer installation – System
Programmer SMP type install is not required!
Initial installation is done into a test DB2 environment
DBAs and Developers usually review Batch Analyzer reports after
it collects data for several days
12. SoftBase Batch Analyzer POC
Batch Analyzer Deployment
Batch Analyzer’s Touch Free Collector can begin gathering
performance data for all DB2 batch jobs in seconds –WITHOUT
JCL CHANGES
Performance collection overhead is typically 1% - 3% for each Job
watched – most customers say it is not even noticeable
Batch Analyzer Touch Free Collector can be started and stopped
with a single command
Batch Analyzer does not require a lengthy trial – it either finds
significant performance problems immediately or it doesn’t!
SoftBase Batch Health Care Consists of:Attach Facility - DB2 Call Attach which permits DB2 batch applications to be run as native MVS jobstreamsCheckpoint - Checkpoint Facility which permits DB2 batch applications to restart at or near the point of failureBatch Analyzer - DB2 Batch Analysis which pinpoints the most expensive batch applications and SQL statements anywhere in batchDeadLock Advisor - DeadLock-Timeout Reporting that immediately reports on all batch jobs involved in -904/-911 situations.
Your most expensive batch job will be at the top of the list of all jobs that ran in the past 24 hour interval.SELECT that job.
Your most expensive Step of the batch job you selected will be at the top of the list.SELECT that Step.
Your most expensive Statement of the Step you selected will be at the top of the list.SELECT that Statement.
The actual SQL Text of the Statement will be displayed. This is the Most Expensive SQL Statement in your entire DB2 batch stream and the one you should tune first.