Skip to Main Content
IBM Data Platform Ideas Portal for Customers


This portal is to open public enhancement requests against products and services offered by the IBM Data Platform 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 Future consideration
Workspace Db2 for z/OS
Created by Guest
Created on Sep 24, 2026

DB2 for z/OS: Remove redundant definitions for RUNSTATS / STATFDBK_PROFILE

When Db2 for z/OS statistics feedback (STATFDBK_SCOPE / STATFDBK_PROFILE) automatically writes recommended COLGROUP statistics into a table's RUNSTATS profile (SYSIBM.SYSTABLES_PROFILES), successive recommendations are appended with no check for whether a new entry subsumes, or is subsumed by, an entry already present. Over time this produces profiles with dozens of overlapping single- and multi-column COLGROUP definitions, driving very large RUNSTATS sort volumes.

Request: give RUNSTATS / STATFDBK_PROFILE a way to recognize and eliminate this kind of redundancy, either at feedback-write time or at RUNSTATS execution time.


Current behavior

STATFDBK_SCOPE (ALL/STATIC/DYNAMIC/NONE) controls when Db2 records optimizer statistics-feedback recommendations into SYSIBM.SYSSTATFEEDBACK. When STATFDBK_PROFILE is YES (the default), each new recommendation is also folded automatically into the table's stored RUNSTATS profile in SYSIBM.SYSTABLES_PROFILES.

RUNSTATS removes a row from SYSSTATFEEDBACK once the recommended statistic has been collected, but nothing removes or consolidates the corresponding entry in SYSTABLES_PROFILES. The profile is a standing, cumulative "recipe" — every COLGROUP ever recommended stays in it indefinitely, including:

  • Single-column FREQVAL entries (typically TYPE F, addressing value-skew for one predicate column)

  • Multi-column COLGROUP entries (typically TYPE C, REASON COMPFFIX, addressing compound filter factor / index correlation for a specific set of ANDed predicate columns)

Because different query shapes over time trigger different, independently-added recommendations, a busy or heavily ad hoc-queried table can accumulate COLGROUP entries that grow one additional column at a time (2-column, then 3-column, then 4-column, and so on, often all anchored on the same leading column), without any of the narrower entries ever being removed once a wider one is added.

Db2 already performs a similar kind of consolidation in one specific case — INDEX ... KEYCARD processing derives FIRSTKEYCARD, intermediate KEYCARD values, and FULLKEYCARD from a single pass over the already-ordered index key, rather than running one sort per cardinality request. No equivalent prefix/subsumption logic appears to exist for STATFDBK-generated, table-level COLGROUP profiles.


Business justification and impact

Observed on Db2 13 for z/OS: a STATFDBK-maintained profile for a single table (~14 columns, partitioned tablespace) had accumulated 31 COLGROUP entries — 6 single-column FREQVAL groups plus 25 multi-column groups ranging from 2 to 8 columns wide, all sharing overlapping leading columns. Real-Time Statistics showed roughly 1.12 billion rows in the sampled partition.

Because the profile's total referenced-column footprint spans nearly every column in the table, RUNSTATS built a composite sort key of ~1,041 bytes (record length ~1,043 bytes) against that row count. The resulting sort work requirement exceeded 17 TB against a ~40 GB per-dataset ceiling, and the job's DFSORT allocation attempted to acquire 255 SORTWK datasets on SYSDA before it could complete.


IMPACT:

  • SYSDA/scratch-volume contention and risk of allocation failure (ICE046A SORT CAPACITY EXCEEDED / dynamic allocation errors) on any subsystem left at STATFDBK's ALL/YES defaults against large, actively-queried tables

  • RUNSTATS elapsed time and zIIP/general CPU cost that grows with a profile's accumulated history rather than with the table's genuine current statistical needs

  • No supported, automated way to identify which profile entries are redundant, short of manually cross-referencing SYSSTATFEEDBACK REASON/TYPE history and hand-editing the profile via SET PROFILE

This is a realistic outcome of running STATFDBK at its shipped defaults against any large, high-cardinality, heavily ad hoc-queried table over a long enough period.


Suggested enhancement approaches

Any of the following, independently or in combination, would address the underlying gap:

  1. Prefix-subsumption elimination at RUNSTATS execution time. When two or more COLGROUP entries in a profile share a common leading-column sequence in the same column order, derive the narrower entries' statistics as a byproduct of the single sort/pass already required for the widest entry — the same technique already used for FIRSTKEYCARD/FULLKEYCARD derivation during INDEX KEYCARD processing. This reduces sort passes and key width without changing what gets collected.

  2. Aging or last-used tracking on profile entries. Record, in SYSTABLES_PROFILES or a companion catalog table, when each COLGROUP entry was added and, ideally, when it last measurably affected an access path decision. Surface entries unused for N RUNSTATS cycles so a DBA can review and remove them — analogous to how SYSSTATFEEDBACK rows are removed once satisfied, but applied to the profile itself.

  3. A profile-size or estimated-sort-key-width governor. A ZPARM or RUNSTATS-level threshold (COLGROUP entry count, or estimated composite sort key width) that STATFDBK_PROFILE respects before auto-appending another entry, issuing a console/report warning instead of silently growing the profile past the threshold.

  4. Pre-append redundancy check in STATFDBK_PROFILE itself. Before folding a new SYSSTATFEEDBACK recommendation into SYSTABLES_PROFILES, check whether the new column set is a strict superset of an existing entry answering the same class of question (FREQVAL vs. plain cardinality) and, if so, skip the narrower add or replace it rather than append.

Needed By Yesterday (Let's go already!)