Troubleshooting
Problem
Symptom
Cause
| A new file is introduced to the system, such as with a large restore. Statistics will need to be created if a new file is introduced to the system. |
| Existing statistics became stale due to records being added or changed. QDBFSTCCOL refreshes stale statistics. |
| Running a set of new queries on the system. New queries might require more statistics to be collected. You might want to run the queries once, let the QDBFSTCCOL finish collecting new statistics, and run the queries again. The query optimizer might be able to choose a better implementation once the statistics are available. |
Diagnosing The Problem
Resolving The Problem
a) CRTLIB TSXXXXXXOQ
b) CRTSAVF FILE(TSXXXXXXOQ/TSXXXXXXOQ) TEXT(QDBFSTCCOL)
c) CRTOUTQ OUTQ(TSXXXXXXOQ/CASEOUTQ)
d) WRKJOB JOB(XXXXXX/QSYS/QDBFSTCCOL) OUTPUT(*PRINT) OPTION(*JOBLOG)
e) WRKSPLF and take option 2 beside the joblog just created and change the outq to the one just created.
The following instructions assume MGTOOLS is on the system, If not, you can follow these instructions to install:
https://www.ibm.com/support/pages/mustgather-how-obtain-and-install-qmgtools-and-keep-it-current
We want to makes sure we have the latest version of MGTOOLS:
QMGTOOLS/CMPVER then F6=Download and update
This command assumes the issue happened within the last 2 days and the joblog is in the library from above. Make the appropriate substitutions.
QMGTOOLS/SYSSNAP OUTPUT(*IFS)
CSDATA(Y)
DAYSPRV(2)
LIB2SAV1(TSXXXXXXOQ)
Step 4 from this link is a good resource on how to send the zip file to the case
https://www.ibm.com/support/pages/node/6574525
CAUTION: The side effect of changing the system value is that the database statistics will not be refreshed and can be stale. Stale statistics can cause the SQL Query Optimizer to make ineffective decisions about how to implement your SQL queries and cause them to run longer. In addition, the processing and resource usage might be more noticeable when the QDBFSTCCOL system value is turned back on versus if the system were allowed to collect statistics over the entire day. The system builds statistics for what is in the plan cache so if the system value is toggled, on a regular basis, there might be a set of queries that only run a few times during the day that might never have appropriate statistics gathered. |
For more information, refer to the IBM DB2 for i Indexing and Statistics Strategies white paper or the IBM Documentation Center
Related Information
Historical Number
512435386
Was this topic helpful?
Document Information
Modified date:
23 November 2025
UID
nas8N1013253