Professional Documents
Culture Documents
Contents / Topics
The DB2 for z/OS environment at UBS
Database-objects monitoring and gathering statistics in a DB2 for z/OS
environment
RTS: Overview and characteristics
What can be get out from the RTS-tables ?
Usage and exploitation of RTS at UBS
Summary, conclusion and outlook
Main sources:
'DB2 V8 Administration Guide: Appendix G 'Real-time statistics tables' by IBM, March 2004
'Using Real Time Statistics (RTS)' by Craig S. Mullins, June 2004
'Optimization of the B/R processes and the Housekeeping at UBS' by UBS-KeyTools, February 2005
ab
Shared
Global
Shared
Divisions
The DB2 at
UBS
WM&BB
IB
Wealth Management
&Business Banking
Investment
Banking
80 TB of DB2
data processed
in // sysplex
environments
65 DB2 subsystems(4 SAP)
ab
APlex2
APlex3
APlex4
London
Asia
RPlex1
JPlex1
IPlex1
MPlex1
Stamford
SPlex1
QPlex1
LPlex1
GCU
Bplex1
Kplex1
WMUS
Weehawken
DPlex
EPlex
FPlex
GPlex
NPlex
UPlex(Prod.)
Local
Plexes
SSP
OPlex
Tplex
Pplex
Shared
Data
17 groupattach
members
for Prod.:
12 way
//-SYSPLEX
(with GDPS)
3
IBM has provided a new feature of DB2 delivers Real Time Statistics
providing up-to-date information about DB2 database objects.
ab
Tablespaces
RUNSTATS utility
DB2 Catalog
systables
systablespace
sysindexes
syscolumns
systablepart
sysindexpart
.
ab
REORG
DELETE
Utilities
COPY
RUNSTATS
INSERT
RECOVER
UPDATE
REBUILD INDEX
LOAD
DB2 DB-Services
(xxxDBM1)
Tablespacestats
ab
Indexspacestats
ab
QUALIFIER
NAME
------------------ ----------DSNRTSDB
DSNRTSDB DSNRTSTS
SYSIBM
TABLESPACESTATS
SYSIBM
TABLESPACESTATS_IX
SYSIBM
INDEXSPACESTATS
SYSIBM
INDEXSPACESTATS_IX
ab
10
ab
POSITION(00001)
POSITION(00009)
POSITION(00017)
POSITION(00026)
POSITION(00035)
POSITION(00044)
POSITION(00071)
POSITION(00094)
POSITION(00109)
POSITION(00124)
POSITION(00134)
POSITION(00161)
POSITION(00188)
POSITION(00203)
POSITION(00218)
POSITION(00233)
POSITION(00248)
POSITION(00263)
POSITION(00278)
POSITION(00293)
POSITION(00308)
POSITION(00335)
POSITION(00350)
POSITION(00365)
POSITION(00380)
POSITION(00395)
POSITION(00422)
POSITION(00437)
POSITION(00452)
POSITION(00459)
30 columns
CHAR (8)
CHAR (8)
INTEGER EXTERNAL(9)
INTEGER EXTERNAL( 9)
INTEGER EXTERNAL( 9)
TIMESTAMP EXTERNAL
FLOAT EXTERNAL(22)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(9)
TIMESTAMP EXTERNAL
TIMESTAMP EXTERNAL
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL( 4)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
TIMESTAMP EXTERNAL
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
TIMESTAMP EXTERNAL
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
CHAR (6)
TIMESTAMP EXTERNAL
11
ab
POSITION(00001)
POSITION(00009)
POSITION(00017)
POSITION(00026)
POSITION(00035)
POSITION(00044)
POSITION(00053)
POSITION(00080)
POSITION(00103)
POSITION(00113)
POSITION(00128)
POSITION(00143)
POSITION(00153)
POSITION(00180)
POSITION(00207)
POSITION(00234)
POSITION(00249)
POSITION(00264)
POSITION(00279)
POSITION(00294)
POSITION(00309)
POSITION(00324)
POSITION(00339)
POSITION(00354)
POSITION(00381)
POSITION(00396)
POSITION(00411)
POSITION(00426)
POSITION(00453)
POSITION(00468)
POSITION(00483)
POSITION(00490)
32 columns
CHAR (8)
CHAR (8)
INTEGER EXTERNAL(9)
INTEGER EXTERNAL(9)
INTEGER EXTERNAL(9)
INTEGER EXTERNAL(9)
TIMESTAMP EXTERNAL
FLOAT EXTERNAL(22)
INTEGER EXTERNAL(9)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(9)
TIMESTAMP EXTERNAL
TIMESTAMP EXTERNAL
TIMESTAMP EXTERNAL
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
TIMESTAMP EXTERNAL
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
TIMESTAMP EXTERNAL
INTEGER EXTERNAL(14)
INTEGER EXTERNAL(14)
CHAR (6)
TIMESTAMP EXTERNAL
12
ab
13
ab
14
ab
15
ab
16
ab
17
ab
18
ab
19
ab
20
ab
21
To determine whether any activity has happened in the past several days
for a particular table space or index, use the UPDATESTATSTIME column
The above query is an example checking whether any activity has
occurred in the past ten (10) days for a tablespace
(you have just to supply the tablespace-name)
ab
22
The RTS tables contain some good basic information about table spaces
The above query can be run to report on the number of rows, active pages, space
used, number of extents, and when the COPY, REORG, LOAD REPLACE, and
RUNSTATS were last run
Notes:
- Pay particular attention to the timestamps indicating the last time that COPY, REORG, and
RUNSTATS were run. If the date is sufficiently old, consider further investigating whether you
should take an image copy, reorganize the table space, or run RUNSTATS.
- Keep in mind though, that the span of time between utility runs is not the only indicator for
when to copy, reorganize, or capture statistics. For example, RUNSTATS may need to be run
only once on static data; similar caveats apply to COPY and REORG when data does not
change.
ab
23
ab
Description
Table spaces having more than 20 extents
Table spaces with more than 100K changes
Table spaces with more than 50 far indirect references
24
ab
25
ab
26
ab
27
Basically, as the number of distinct updated pages and changes since the
last COPY execution increase, the need to take an image copy increases
A good rule of thumb to follow is when the percentage of updated pages
since the last COPY is more than 25% of the active pages, then it is time to
COPY the table space. We can add the following WHERE clause to the
above query to limit the output to only these table spaces:
WHERE ((COPYUPDATEDPAGES*100) / NACTIVE) > 25
ab
28
ab
29
ab
30
ab
31
ab
32
ab
33
ab
34
ab
35
ab
36
ab
37
ab
38
ab
39
DB2 Catalog
RTS
Tables
CARES (U006)
or
CATEX (HKR)
TS1
TS2
IX1
TS3
IX2
Reorg Runstats
Y
Y
N
N
N
Y
N
Y
N
Y
IC
FIC
IIC
N
N
FIC
Automation
(CARES and DB2ICF)
ab
40
ab
41
ab
42
ab
43
ab
44
ab
45
ab
46
Arch
Log
Log
Monday
RTS
IIC
Tuesday
Quiesce
Runstats
RTS
IIC
Quiesce
Runstats
Merge
Merge
FIC
ab
Log
Log
Arch
Log
Log
Arch
Log
Log
Log
Log
Wednesday
Thursday
RTS
RTS
IIC
Quiesce
Runstats
Merge
FIC
Arch
IIC
Log
Log
Quiesce
Runstats
RTS
IIC
Arch
Log
Log
Saturday/Sunday
Friday
RTS
Quiesce
Runstats
FIC
FIC
Reorg
Merge
Merge
FIC
Arch
FIC
FIC
FIC:
Weekly non disruptive Full IC (dual) for all DB's per group
Log/Arch: Permanent Logging (dual) on DASD and Archive on tape
RTS/IIC: According RTS (Real time statistics) the IBM supplied stored procedure
(DSNACCOR triggers IIC's for all DB's which have been updated since last IIC )
Merge:
Mergecopy utility will merge all IIC's since last FIC to a new FIC
Quiesce: Daily QUIESCE before TEV (needed point of consistency for the DB's)
Runstats: According RTS (Real time statistics) the IBM supplied stored procedure
(DSNACCOR triggers Runstats for all DB's which need a "refresh" of the statistics)
Reorg:
According RTS (Real time statistics), CARES (Report U006 using DSNACCOR)
triggers Reorgs incl. Inline Runstats, IC, Rebinds and Dataset-Resizing
47
Alternative 1
Phase I
TS stats
IX stats
DB2ICF
Alternative 2
RTS
Tables
Phase II
U002
R010
R011
U006
Automation:
for Groups of DB's
according set/reached thresholds
ab
TS/IX Reorgs
Inline Runstats
Inline copy
Automation:
for Groups of DB's
according DSNACCOR
recommendations
DS-Resizing
Rebinds
OPC
48
Real Time
Statistics Mode
CARES Reports
CARES Report
CARES Report
CARES Report
Extract of DB2
Table-/Indexspace
datasets
(DECOLLECT)
Compression
switched on/off but
no REORG/LOAD
Extract of Real-Time
Statistics
Recommendations
(DSNACCOR)
U002
R027
U006
R010
R011
Statistics
St
ics
ist
t
a
Ext
ics
Statist
CARES
R010
Table
DB2
Catalog
CARES
R011
Table
fin
De
i ti
s
on
DB2ICF
Grouping
ab
DB-Group
ent
CARES
U002
Table
CARES
R027
Table
CARES
U006
Table
Real-Time
Statistics
Space
USERTS(N)
COMPSWIT(Y)
USERTS(Y)
Real-Time
Statistics
Tables
49
ab
50
ab
51
ab Andr Goetschy
andre.goetschy@ubs.com
ab
52