By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,658 Members | 1,523 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,658 IT Pros & Developers. It's quick & easy.

About automatic database maintenance

P: n/a
Hello,

Linux RedHat AS4 running DB2 V8 FP11.

I have followed the docs at http://tinyurl.com/qckrn and enabled
automatic statistics collection. It has been 2 days since I updated my
DB cfg and I don´t see any activity regarding auto runstats.

Also, the field STATS_TIME from syscat.tables shows that all my table
statistics were last collected in March. What am I missing here ? Is
there any special event that triggers a new auto statistics collection
? When should I expect it to happen ?

Automatic maintenance (AUTO_MAINT) = ON
Automatic database backup (AUTO_DB_BACKUP) = OFF
Automatic table maintenance (AUTO_TBL_MAINT) = ON
Automatic runstats (AUTO_RUNSTATS) = ON
Automatic statistics profiling (AUTO_STATS_PROF) = OFF
Automatic profile updates (AUTO_PROF_UPD) = OFF
Automatic reorganization (AUTO_REORG) = OFF

Thanks in advance,

Apr 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
DB2 decides if and when to run stats.
You should run stats just before or after enbling auto maintenace.
From then db2 will look at the table activity and decide if they are needed
and the when will happen in the iffline/online window you specified.

Look at the runstats command and the profile option. This allows you to
store the actual command used for the stats on that table. Subsequently,
you can tell db2 to runstats using that profile.
AUTO_STATS_PROF will do that for tables where auto_runstats is specified in
the filter.
AUTO_FOR_UPD will cause db2 to analuze the access plan and its usage
dynamically and change the parameters of the options in the profile you
created andor that db2 crweatd"/modified prior to that analuzed executuion.

If you do not see stats taken for a period of time with AUTO on, it's
probably because db2 has not noticed a level of change activity that would
warrant taking stats.

HTH, Pierre.

--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"Michel Esber" <mi****@us.automatos.com> a écrit dans le message de news:
11**********************@z34g2000cwc.googlegroups. com...
Hello,

Linux RedHat AS4 running DB2 V8 FP11.

I have followed the docs at http://tinyurl.com/qckrn and enabled
automatic statistics collection. It has been 2 days since I updated my
DB cfg and I don´t see any activity regarding auto runstats.

Also, the field STATS_TIME from syscat.tables shows that all my table
statistics were last collected in March. What am I missing here ? Is
there any special event that triggers a new auto statistics collection
? When should I expect it to happen ?

Automatic maintenance (AUTO_MAINT) = ON
Automatic database backup (AUTO_DB_BACKUP) = OFF
Automatic table maintenance (AUTO_TBL_MAINT) = ON
Automatic runstats (AUTO_RUNSTATS) = ON
Automatic statistics profiling (AUTO_STATS_PROF) = OFF
Automatic profile updates (AUTO_PROF_UPD) = OFF
Automatic reorganization (AUTO_REORG) = OFF

Thanks in advance,

Apr 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.