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 > Need Runstats ??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-09, 11:55
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Need Runstats ??

Guys,

How can I tell that the table needs RUNSTATS ??

Thanks

DBFinder
Reply With Quote
  #2 (permalink)  
Old 10-26-09, 13:30
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
Reply With Quote
  #3 (permalink)  
Old 10-26-09, 13:41
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
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
Reply With Quote
  #4 (permalink)  
Old 10-26-09, 14:18
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
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.1.0.2 os 5.3.0.0
Reply With Quote
  #5 (permalink)  
Old 10-26-09, 14:23
DBFinder DBFinder is offline
Registered User
 
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
Thanks Cougar8000 ,

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

Thanks for your time.
DBFinder
Reply With Quote
  #6 (permalink)  
Old 10-26-09, 18:30
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
Reply With Quote
  #7 (permalink)  
Old 10-26-09, 19:43
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
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.
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