Results 1 to 4 of 4

Thread: Weekly RUNSTATS

  1. #1
    Join Date
    Dec 2009

    Question Unanswered: 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.

  2. #2
    Join Date
    Apr 2006
    Provided Answers: 11
    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
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

  3. #3
    Join Date
    Aug 2008
    Toronto, Canada

  4. #4
    Join Date
    May 2003
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts