If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > reorgchk report

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-15-11, 01:40
jayawant01 jayawant01 is offline
Registered User
 
Join Date: Jun 2008
Posts: 40
reorgchk report

Hi Guys,

I am working on db2 luw version 8.1 on aix .


I have generated a reorgchk report for the tables in my database , For a few of them i could see some "*" for some of the tables .

To my understanding if for any formula for that table u see a "*" u can blindly do a reorg for it .

Am I right ? or is it that even if you find a "*" its not compulsory that reorg is required for that table , is there some additional criteria to check that .

Thanks
Sandeep
Reply With Quote
  #2 (permalink)  
Old 12-15-11, 01:51
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
Hi,

http://public.dhe.ibm.com/software/d...ages_0508I.pdf
see section "Improving availability during table and index maintenance"

Cheers
Reply With Quote
  #3 (permalink)  
Old 12-15-11, 02:05
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
I would suggest some reading about the command itself before acting on any message
try to understand what is going on
REORGCHK
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #4 (permalink)  
Old 12-15-11, 02:16
jayawant01 jayawant01 is offline
Registered User
 
Join Date: Jun 2008
Posts: 40
reorgchk report

Hi ,

Thanks for the link .

But it doesn't answer my question .

I still want to know if you see a "*" ,then should u chk any additional info or you can blindly do a reorg or not .

Right now my concern is not with the position of the "*" and which option to use with reorg (clean up etc ) .
Reply With Quote
  #5 (permalink)  
Old 12-15-11, 02:26
nvk@vhv nvk@vhv is offline
Registered User
 
Join Date: Jan 2010
Posts: 294
If you want to, you can blindly reorg each table every day.

Or you can spend a few second and check if a reorg is necessary or not. That's why przytula_guy and i provided you the links.
Reply With Quote
  #6 (permalink)  
Old 12-15-11, 02:26
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
you should check what the * stands for and analyze if the cause is important for you
in case it is for space reclamation - it might be you have space enough and this is a warning for you
if clustering is low - it might be important and I decide todo a reorg..
as indicated before : try to understand what is going on and how to act on this
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #7 (permalink)  
Old 12-15-11, 02:34
jayawant01 jayawant01 is offline
Registered User
 
Join Date: Jun 2008
Posts: 40
reorgchk report

Got it !!

Thanks
Sandeep
Reply With Quote
  #8 (permalink)  
Old 12-15-11, 07:16
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
Depending on your table/index definitions, you may not be able to get rid of all '*'. For example, for the index cluster ratio. So always reorganizing a table if some '*' occurs somewhere is most likely the wrong approach.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #9 (permalink)  
Old 12-15-11, 09:27
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
Quote:
Originally Posted by stolze View Post
Depending on your table/index definitions, you may not be able to get rid of all '*'. For example, for the index cluster ratio. So always reorganizing a table if some '*' occurs somewhere is most likely the wrong approach.
This is my experience also (and other issues besides index cluster ratio). IMO the reorgchk program is a piece of junk and cannot be relied upon to automatically initiate reorgs. This is not a big concern if there is a defined maintenance window and one can do classic reorgs (offline), but is a problem for inplace (online) reorgs, especially since they run asynchronously, and one does not want to have more than few running at any given time (which is hard to control with asynchronous background processes).

The two main things you need to worry about for tables are clustering (if you have a clustering index and there have been a lot of inserts and deletes), and especially overflow pages. For indexes, badly fragmented indexes should be reorged if practical, although for an OLTP application you may not see a huge benefit.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #10 (permalink)  
Old 12-17-11, 02:02
manuavaran manuavaran is offline
Registered User
 
Join Date: Dec 2011
Posts: 27
am not sure this will help you
you can know the need of "reorg table" by checking reorg pending state of the table. if the value is greater than 3 execute reorg cmnd

Quote:
reorgpensql = "SELECT * FROM SYSIBMADM.ADMINTABINFO WHERE TABSCHEMA = 'schema_name' AND TABNAME='" & Tab_Name & "' AND REORG_PENDING = 'Y'"
Set reorgpenrs = Conn.Execute(reorgpensql)
if not reorgpenrs.eof then
maxno = reorgpenrs("NUM_REORG_REC_ALTERS")
if maxno > 2 Then
Conn.Execute("call SYSPROC.ADMIN_CMD ('REORG TABLE " & Tab_Name & "')")
End If
End If
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On