zefrim Beginner
Joined: 29 Jun 2006 Posts: 22 Topics: 19
|
Posted: Thu Nov 30, 2006 9:47 am Post subject: SQL-Query to identify some reorg-candidates in db2 v8 Z-os |
|
|
Hello friends,
somewone give me an Query to identifies rows which shoulde be reorganized - My question: Is this a good method?
Code: |
SELECT DISTINCT C.DBNAME
,C.TSNAME
,C.PARTITION
FROM SYSIBM.SYSINDEXES A
,SYSIBM.SYSTABLES B
,SYSIBM.SYSTABLEPART C
,SYSIBM.SYSTABLESPACE D
WHERE A.CLUSTERING = 'Y'
AND A.CLUSTERED = 'N'
AND C.CARDF > 0
AND C.DBNAME NOT IN ('DSNDB06')
AND A.DBNAME = B.DBNAME
AND A.TBNAME = B.NAME
AND A.TBCREATOR = B.CREATOR
AND A.DBNAME = C.DBNAME
AND B.TSNAME = C.TSNAME
AND A.DBNAME = D.DBNAME
AND B.TSNAME = D.NAME
|
|
|