Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655

    Unanswered: Need Runstats ??

    Guys,

    How can I tell that the table needs RUNSTATS ??

    Thanks

    DBFinder

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Usually you make an educated guess. Or let the automatic table maintenance do it for you. Automatic RUNSTATS execution is triggered when 10% of the table data are changed.
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    For an instance, my manager wants to know which tables in POSAPP schema need Runstats; What should I tell him ?

    I believe that there must be any logic to find out. Some time s Control center warns about runstats were not run for such table.

    Thanks anyway,

    DBFinder

  4. #4
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    read up on fpages and npages. diff between them should be your trigger to runstats. What that diff is upto you as you play with it. I think generally it is between 10 and 20%

    From there you can write a script that will runstats only those that meet your creteria. This way you will have control on when stats are done and if they are done at all unlike with automatic future.
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  5. #5
    Join Date
    Sep 2008
    Location
    Toronto,Canada
    Posts
    655
    Thanks Cougar8000 ,

    Yes that makes sense, I guess that's what I needed.

    Thanks for your time.
    DBFinder

  6. #6
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by Cougar8000
    read up on fpages and npages. diff between them should be your trigger to runstats. What that diff is upto you as you play with it. I think generally it is between 10 and 20%
    I think this is a misleading statement.

    Code:
    > select count(1) from a_table
    
                   1
    --------------
             10000
    
    > load from a_file ... insert into a_table
    
    > select count(1) from a_table
    
    > select count(1) from a_table
    
                   1
    --------------
       10000000
    
    > create index an_index on a_table ...
    Did the fpages/npages ratio change? No. Do you want to collect statistics still? I know I would.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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