Determining whether an object requires reorganization MVS DB2
You must reorganize an object if it is in the REORG-pending (REORP) restrictive status.
Also, consider reorganizing an object if it is in an advisory REORG-pending status (AREO* or AREOR) or if analysis shows that reorganization might improve performance.
Use the REORG INDEX or REORG TABLESPACE utility to reorganize the object.
About this task
Recommendation: Run the RUNSTATS utility if the statistics are not current. If the object should also be reorganized, run REORG with STATISTICS and take inline copies. If you run REORG PART and nonpartitioning indexes exist, subsequently run RUNSTATS for each nonpartitioning index.
Procedure
To determine whether an object requires reorganization, use any of the following approaches:
One:
Reorganize table spaces or partitions that are in REORG-pending status.
Use the DISPLAY DATABASE RESTRICT command to display those table spaces and partitions that require reorganization.
Run the REORG TABLESPACE utility and specify the OFFPOSLIMIT and INDREFLIMIT catalog query options with the REPORTONLY option.
REORG produces a report with one of the following return codes, but the object is not reorganized.
1
No limit met; no reorganization is performed or recommended.
2
A reorganization is performed or recommended.
Two:
Use the SYSTABLEPART and SYSINDEXPART catalog tables to find which table spaces and indexes qualify for reorganization.
The information in these catalog tables can also be used to determine when the DB2? catalog table spaces require reorganization.
Information from the SYSTABLEPART catalog table can also indicate how well disk space is being used.
If you want to find the number of varying-length rows that were relocated to other pages because of an update, run RUNSTATS, and then issue the following statement: Begin program-specific programming interface information.
SELECT CARD, NEARINDREF, FARINDREF
FROM SYSIBM.SYSTABLEPART
WHERE DBNAME = 'XXX'
AND TSNAME = 'YYY';
For Example:
SELECT IXNAME, IXCREATOR, FREEPAGE, LEAFDIST
FROM SYSIBM.SYSINDEXPART
WHERE LEAFDIST > 200 and IXCREATOR = 'DBPCHIR';
IXNAME IXCREATOR FREEPAGE LEAFDIST
APPIOTEA DBPCHIR 0 233
OOPIOTEA DBPCHIR 0 334
QCHIBATE DBPCHIR 10 3167
QCHICPDA DBPCHIR 10 15024
Because there are two records with FREEPAGE = 0, so there are two table space need to be reorg.
End program-specific programming interface information.
A large number (relative to previous values that you received) for FARINDREF indicates that I/O activity on the table space is high.
If you find that this number increases over a time, you probably need to reorganize the table space to improve performance.
You probably also need to increase PCTFREE or FREEPAGE for the table space with the ALTER TABLESPACE statement.
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.
Begin program-specific programming interface information.
SELECT PERCDROP
FROM SYSIBM.SYSTABLEPART
WHERE DBNAME = 'XXX'
AND TSNAME = 'YYY';
End program-specific programming interface information.
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: Begin program-specific programming interface information.
SELECT NEAROFFPOSF, FAROFFPOSF
FROM SYSIBM.SYSINDEXPART
WHERE IXCREATOR = 'index_creator_name'
AND IXNAME = 'index_name';
SELECT NEAROFFPOSF, FAROFFPOSF, IXNAME, IXCREATOR, FREEPAGE, LEAFDIST
FROM SYSIBM.SYSINDEXPART
WHERE IXCREATOR = 'DBPCHIR'
AND IXNAME in
( SELECT IXNAME
FROM SYSIBM.SYSINDEXPART
WHERE LEAFDIST > 200 and IXCREATOR = 'DBPCHIR'
);
NEAROFFPOSF FAROFFPOSF IXNAME IXCREATOR FREEPAGE LEAFDIST
2 15 APPIOTEA DBPCHIR 0 233
273 86 OOPIOTEA DBPCHIR 0 334
42,369 59,983 QCHIBATE DBPCHIR 10 3167
9,123 43,753 QCHICPDA DBPCHIR 10 15024
End program-specific programming interface information.
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.
Also, consider reorganizing an object if it is in an advisory REORG-pending status (AREO* or AREOR) or if analysis shows that reorganization might improve performance.
Use the REORG INDEX or REORG TABLESPACE utility to reorganize the object.
About this task
Recommendation: Run the RUNSTATS utility if the statistics are not current. If the object should also be reorganized, run REORG with STATISTICS and take inline copies. If you run REORG PART and nonpartitioning indexes exist, subsequently run RUNSTATS for each nonpartitioning index.
Procedure
To determine whether an object requires reorganization, use any of the following approaches:
One:
Reorganize table spaces or partitions that are in REORG-pending status.
Use the DISPLAY DATABASE RESTRICT command to display those table spaces and partitions that require reorganization.
Run the REORG TABLESPACE utility and specify the OFFPOSLIMIT and INDREFLIMIT catalog query options with the REPORTONLY option.
REORG produces a report with one of the following return codes, but the object is not reorganized.
1
No limit met; no reorganization is performed or recommended.
2
A reorganization is performed or recommended.
Two:
Use the SYSTABLEPART and SYSINDEXPART catalog tables to find which table spaces and indexes qualify for reorganization.
The information in these catalog tables can also be used to determine when the DB2? catalog table spaces require reorganization.
Information from the SYSTABLEPART catalog table can also indicate how well disk space is being used.
If you want to find the number of varying-length rows that were relocated to other pages because of an update, run RUNSTATS, and then issue the following statement: Begin program-specific programming interface information.
SELECT CARD, NEARINDREF, FARINDREF
FROM SYSIBM.SYSTABLEPART
WHERE DBNAME = 'XXX'
AND TSNAME = 'YYY';
For Example:
SELECT IXNAME, IXCREATOR, FREEPAGE, LEAFDIST
FROM SYSIBM.SYSINDEXPART
WHERE LEAFDIST > 200 and IXCREATOR = 'DBPCHIR';
IXNAME IXCREATOR FREEPAGE LEAFDIST
APPIOTEA DBPCHIR 0 233
OOPIOTEA DBPCHIR 0 334
QCHIBATE DBPCHIR 10 3167
QCHICPDA DBPCHIR 10 15024
Because there are two records with FREEPAGE = 0, so there are two table space need to be reorg.
End program-specific programming interface information.
A large number (relative to previous values that you received) for FARINDREF indicates that I/O activity on the table space is high.
If you find that this number increases over a time, you probably need to reorganize the table space to improve performance.
You probably also need to increase PCTFREE or FREEPAGE for the table space with the ALTER TABLESPACE statement.
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.
Begin program-specific programming interface information.
SELECT PERCDROP
FROM SYSIBM.SYSTABLEPART
WHERE DBNAME = 'XXX'
AND TSNAME = 'YYY';
End program-specific programming interface information.
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: Begin program-specific programming interface information.
SELECT NEAROFFPOSF, FAROFFPOSF
FROM SYSIBM.SYSINDEXPART
WHERE IXCREATOR = 'index_creator_name'
AND IXNAME = 'index_name';
SELECT NEAROFFPOSF, FAROFFPOSF, IXNAME, IXCREATOR, FREEPAGE, LEAFDIST
FROM SYSIBM.SYSINDEXPART
WHERE IXCREATOR = 'DBPCHIR'
AND IXNAME in
( SELECT IXNAME
FROM SYSIBM.SYSINDEXPART
WHERE LEAFDIST > 200 and IXCREATOR = 'DBPCHIR'
);
NEAROFFPOSF FAROFFPOSF IXNAME IXCREATOR FREEPAGE LEAFDIST
2 15 APPIOTEA DBPCHIR 0 233
273 86 OOPIOTEA DBPCHIR 0 334
42,369 59,983 QCHIBATE DBPCHIR 10 3167
9,123 43,753 QCHICPDA DBPCHIR 10 15024
End program-specific programming interface information.
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.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/6126/viewspace-2062550/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Determining Whether Global Naming Is Enforced 未解決?
- MVS DB 的一些基本操作
- Determining the Global Database Name (86)Database
- Script to find Whether patches is applied in Oracle EBSAPPOracle
- SAP客戶信貸重組(credit control reorganization)
- How to check whether the current database in using Oracle optionsDatabaseOracle
- How to Check whether SELinux is Enabled or Disabled [ID 432988.1]Linux
- innobackupex: Error: --decompress requires qpressErrorUI
- 【C++】requires關鍵字簡介C++UI
- iOS signing for "***" requires a development team.iOSUIdev
- YouCompleteMe unavailable : requires Vim 7.4.143AIUI
- struct.error: 'h' format requires -32768 number 32767StructErrorORMUI
- Uncaught TypeError: Object [object Object] has no method 'xxx'ErrorObject
- AIX: Determining Oracle Memory Usage On AIX (Doc ID 123754.1)AIOracle
- VMware: ESXi requires the Execute Disable/No Execute CPU feature to be enabledUI
- 事務傳播機制之REQUIRES_NEWUI
- ObjectObject
- DB2:ksh: db2: not found.DB2
- 介面返回[object,Object]解決方法Object
- Effective Object C 2.0 『熟悉Object C』Object
- flutter doctor 時 提示 Flutter requires Android SDK 28 and ...【flutter】FlutterUIAndroid
- IE報vuex requires a Promise polyfill in this browser問題解決VueUIPromise
- Linux BRIDGED 模式下的Determining IP information for eth0...failedLinux模式ORMAI
- DB2系列之DB2安裝DB2
- check whether the crystal report runtime is exists 檢查crystalreport執行時是否存在
- ES7 Object.keys,Object.values,Object.entriesObject
- Object被其他的Object引用的SQLObjectSQL
- OBJECT_ID和DATA_OBJECT_IDObject
- Object流Object
- 其它 ObjectObject
- object in javascriptObjectJavaScript
- Authorization ObjectObject
- object類Object
- 【ASM】ORA-15283: ASM operation requires compatible...ASMUI
- [DB2]DB2備份和恢復DB2
- [DB2]db2重定向恢復DB2
- Differences between DATA_OBJECT_ID and OBJECT_IDObject
- object_id 及 data_object_id (oracle)ObjectOracle