With DISTRIBUTION option is only useful under the following conditions:
1) Several 100k or m rows
2) Columns chosen for distribution have non-uniform (skewed) distribution
3) Columns are used in EQUAL = predicates ( take frequency)
or
Columns are used in range delimiting (take quantiles)
4) No paramater markers and or host variables. (Unless you want to get in a
discussion about REOPT)
As a guideline, start with those 4 rules, take distribution stats only for
those columns and once you got what you think is right, save the profile in
your last runstats command.
That way, you can come back to that table and runstats again with USE
PROFILE and not have to temember.
HTH, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Praveen_db2" <pa************@gmail.com> a écrit dans le message de news:
5b******************************@loc...tdatabases.com...
Hi
Thanks for the reply.
You are correct.I collect stats using "WITH DISTRIBUTION" clause.Actually
I was of thought the more detailed the stats are,the more help db2 can get
to make better access plans.But it seems the more the options for db2,more
the time it takes to optimize it.
Regarding package cache our applications have a lot of static and dynamic
sql used.About 3 weeks back I was getting error of Package Cache
overflow.I increased the cache for it and that error is gone.Can you tell
me how to increase the package reuse??
TIA
Praveen