MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SQL-Query to identify some reorg-candidates in db2 v8 Z-os

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
zefrim
Beginner


Joined: 29 Jun 2006
Posts: 22
Topics: 19

PostPosted: Thu Nov 30, 2006 9:47 am    Post subject: SQL-Query to identify some reorg-candidates in db2 v8 Z-os Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group