update index statistics for DB2 V 8.1

Dear all,

How to update the statistics of all index of all table of a given schema ?

by http://www.ibm.com/developerworks/data/library/techarticle/dm-0412pay/ ?

"Collect catalog statistics on all indexes only

RUNSTATS ON TABLE db2admin.department FOR INDEXES ALL"

for all index on TABLE db2admin.department
?
LVL 1
marrowyungSenior Technical architecture (Data)Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kent OlsenData Warehouse Architect / DBACommented:
Hi marrowyung,

Your example should do just fine.


Kent
0
marrowyungSenior Technical architecture (Data)Author Commented:
what is this :

reorg indexes all for table schema.table name ?

after reorg, we have to run RUNSTATS ?
0
Kent OlsenData Warehouse Architect / DBACommented:
Yes, you should run RUNSTATS after REORG.

If you have packages that use the table you should also rebind them with the REBIND statement.


Kent
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

marrowyungSenior Technical architecture (Data)Author Commented:
"If you have packages that use the table you should also rebind them with the REBIND statement.

show me what you mean? command ?
0
Kent OlsenData Warehouse Architect / DBACommented:
If you didn't explicitly BIND objects (stored procedures, etc.) you don't have to rebind them.  But if you did, rebinding them should be done to allow the object to use any new indexes and/or statistics.

This is something that only the DBA can do.

BIND filename
0
marrowyungSenior Technical architecture (Data)Author Commented:
wait, what "package" are you talking about ?

REBIND means the new package use the updated statistic information from the table ?
0
Kent OlsenData Warehouse Architect / DBACommented:
If you don't bind your objects, you don't need to rebind them.  It sounds like you never did bind them.  (No problem.)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB2

From novice to tech pro — start learning today.