Skip to Main Content
IBM Data and AI Ideas Portal for Customers


This portal is to open public enhancement requests against products and services offered by the IBM Data & AI organization. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:


Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,


Post your ideas

Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,

  1. Post an idea

  2. Upvote ideas that matter most to you

  3. Get feedback from the IBM team to refine your idea


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

IBM Employees should enter Ideas at https://ideas.ibm.com


Status Not under consideration
Workspace Db2
Created by Guest
Created on Jul 15, 2016

Improvements for Automatic Runstats

Auto-runstats (AR) is invoked by health monitor on a fixed timer, each timer 7500 seconds (approx . 2 hours) apart. AR consists of "iterations". In each iteration, AR evaluates tables/views one by one. If a table is deemed needing stats, AR will issue runstats and wait for the runstats to finish before it evaluates the next table.
After AR completes evaluating and potentially doing runstats on a table, it checks how much time is left until the next timer (in other words, how much time is left in the current 7500 seconds interval).
If there is less than 5 sec left, AR stops this iteration. Then at the next timer health monitor will invoke auto-runstats again, and auto-runstats will start another iteration.
If when AR checks the time, it already passed the next timer (i.e. time-left is negative), it realizes that it used up the 7500 seconds, and it will end the iteration. But the problem is that AR missed the timer and now will have to wait for the next one.

That means that eg. in a 12-hour long online-maintenance window AR may only use roughly 6 hours of it if when after every iteration it realizes that is has passed the start of the next timer and has to wait for the next but one.
In an environment with tens of thousands of tables this leads to the situation that AR is not able to evaluate all tables in the given 12 hour online-maintenance window.

This leads to our second issue:
When having Statistical Views (Statviews) and using AUTO_STATS_VIEWS=ON in DB CFG, it may take weeks until Runstats is run on a statistical view after Runstats on the underlying base tables of the statview was run:
In each AR priority group, views are placed after table. In our case, there are enough tables to occupy all AR interval (we see this in db2optstatlogs, the whole interval of 7500+ seconds is filled with auto-runstats on tables), so views don't get a chance to run.
When an AR iteration finishes, the queue is cleaned. In the next iteration, AR fills the queue again but views are still placed after tables. Eventually, AR will recognize that the views are starving, and will place the views in group 2. Then the views will get runstats.
The problem is the starvation criteria. AR recognizes starving when the object (table/view) missed more than 56 iterations.
In our case we have a 12 hr maintenance window per day. Assume on average AR can complete 2.5 iterations in each maintenance window (as described above). 56 iterations is roughly 22 days - so it can take up to three weeks after a Runstats is done on a Statview.

We already reduced the scope of tables considered by AR to a minimum, and also use stats sampling to reduce runstats time on large tables.

This leads us to ask for these enhancements:
1. invoke AR again immediately and don't wait for the next timer when it didn't finish its job in the last iteration
2. Change the starvation criteria for stats-views in a way that their runstats will follow the base tables runstats much closer