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 > Weekly RUNSTATS

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-12-09, 23:48
dbsukumar dbsukumar is offline
Registered User
 
Join Date: Dec 2009
Posts: 1
Question Weekly RUNSTATS

We have a DB2 database. Every Week Saturday we have a TP window. During TP window we do run REORGS/IMAGE COPIES/RUNSTATS on all tables in the database. I know IMAGE COPIES are very important and need to run every week.

How to decide we need to run REORGS/RUNSTATS weekly or not. Instead of running weekly can we run biweekly or monthly. What are the factors we need consider to decide whether we need to run REORGS/RUNSTATS for a particular period(whether it is for weekly/biweekly/monthly).

Any response/help is more appreciable.
Reply With Quote
  #2 (permalink)  
Old 12-13-09, 07:38
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
runstats should be run on tables that are much alive, to reflect current situtaion
reorg should be based on output of reorg check
there is no recommended interval - depends on usage of table
__________________
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
  #3 (permalink)  
Old 12-13-09, 09:43
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Reply With Quote
  #4 (permalink)  
Old 12-13-09, 14:41
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Since you mentioned image copies, I assume you are running DB2 for z/OS.

If you were to do weekly reorgs, and then runstats right after, then the runstats would not reflect the "average" state of the database during the week, so I might run reorgs on the weekend, and run runstats Tuesday night, to get the average state of the data during the week. Runstats (unlike reorg) can be done with little or no interference to applications.

And if your tables are not rapidly growing or shrinking, you could probably get away with doing the Tuesday (mid-week) runstats once a month, or even less often for tables that don't change much. For programs that use static SQL (most COBOL, PLI, Stored Procedures, etc), then the access plan would not change anyway unless there was an explicit rebind of the plan or package involved.

Many people who do not work in the mainframe world fail to understand that in most companies the z/OS jobs are charged back to an account, and that such jobs are not ""free", and in fact can be quite expensive.
__________________
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
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