Sie sind auf Seite 1von 3

Example Type 42 - After

0
100,000,000
200,000,000
300,000,000
400,000,000
500,000,000
600,000,000
700,000,000
800,000,000
900,000,000
1,000,000,000
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97
0
100,000
200,000
300,000
400,000
500,000
600,000
700,000
800,000
900,000
1,000,000
CAL TOTRESP TM
TOT I/O
Methods to determining when to
Reorganize a DB2 Tablespace
SELECT CARD, NEARINDREF, FARINDREF
FROM SYSIBM.SYSTABLEPART WHERE DBNAME = XXX AND TSNAME =
YYY;
A large number (relative to previous values that you have received) for FARINDREF indicates that I/O activity
on the table space is high. If you find that this number increases over a period of time, you probably need to
reorganize the table space to improve performance, and increase PCTFREE or FREEPAGE for the table space
with the ALTER TABLESPACE statement.
SELECT PERCDROP
FROM SYSIBM.SYSTABLEPART WHERE DBNAME = XXX AND TSNAME =
YYY;
The following statement returns the percentage of unused space in nonsegmented table space YYY. In
nonsegmented table spaces, the space that is used by dropped tables is not reclaimed until you reorganize the
table space.
Issue the following statement to determine whether the rows of a table are stored in the same order as the
entries of its clustering index:
SELECT NEAROFFPOSF, FAROFFPOSF FROM SYSIBM.SYSINDEXPART
WHERE IXCREATOR = index_creator_name AND IXNAME =
index_name;
Several indicators are available to signal a time for reorganizing table spaces.
A large value for FAROFFPOSF might indicate that clustering is deteriorating. In this case, reorganize the table
space to improve query performance. A large value for NEAROFFPOSF might indicate also that reorganization
might improve performance. However, in general NEAROFFPOSF is not as critical a factor as FAROFFPOSF.
Methods to determining when to
Reorganize a DB2 Tablespace
But with V9, I'd use the REORG utility:
//REORGCHK EXEC PGM=DSNUTILB,PARM='DB1S,REORGCHK'
//STEPLIB DD DISP=SHR,DSN=DB2.V9R1.SDSNLOAD
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(50,50))
//SYSPRINT DD SYSOUT=*
//UTPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=T
//SYSIN DD *
REORG TABLESPACE GSDB1.GOSALES
OFFPOSLIMIT INDREFLIMIT REPORTONLY
/*
REORG produces a report with one of the following return
codes
(No REORG is performed)
1 - No limit met; no REORG is performed or recommended.
2 - REORG is performed or recommended.

Das könnte Ihnen auch gefallen