dostats for big big tables
Posted in 2009
Topics: General Discussion
Hi all,
running dostats -d -e , I've realized that for the key columns the script runs
update statistics low before running update statistics high. Is there anyparticular reason? is it to clean the distributions?
My concern is because my system has really big tables and the whole process
takes a lot of time. If those big tables have a small daily percent of new
rows if you compare with the size of the table, does it worth to run update
stats low and then update stats high for the key columns?
thanks in advance
If there are a small percentage of new rows and updates, then it's probably
not even necessary to run dostats daily. At least not a full run. Look at
the -a/-A and -b/-B options. You can use that to only update tables that
have had significant percentile changes in the number of rows (-b) or whose
stats are too many days old (-a).
As to the LOW, it's being run on each full index key to update the
sysindices/sysindexes record for that key. Since neither the HIGH nor the
MEDIUM contain the entire key for most multi-key indexes that record is not
updated by the HIGH or MEDIUM. Therefore, I run the LOW on each of the full
keys, then HIGH with DISTRIBUTIONS ONLY so that it does not redundantly
update the syscolumns records for the lead columns (the LOW will have done
that already). It is therefore needed.
Art S. Kagel
Oninit (www.oninit.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Oninit, the IIUG, nor any other organization
with which I am associated either explicitly or implicitly. Neither do
those opinions reflect those of other individuals affiliated with any entity
with which I am affiliated nor those of the entities themselves.
On Thu, Oct 1, 2009 at 5:50 AM, CLAUDIO NAVARRO <claudio.oami@gmail.com>wrote:
> Hi all,
>
> running dostats -d -e , I've realized that for the key columns the script
> runs
> update statistics low before running update statistics high. Is there any> particular reason? is it to clean the distributions?
> My concern is because my system has really big tables and the whole process
> takes a lot of time. If those big tables have a small daily percent of new
> rows if you compare with the size of the table, does it worth to run update
> stats low and then update stats high for the key columns?
>
> thanks in advance
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--0015174736527ada910474e113ea