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 for z/OS
Created by Guest
Created on Nov 14, 2013

Send IFCID 317 data to SMF when stmts leaves cache

There is currently no way to get the text of a dynamic SQL statement when it leaves the cache. If one has IFCID 316 turned on, one can collect the SQL usage metrics in SMF, but not the text. One can get the statement text if one uses the EXPLAIN statement to periodically take a snapshot of the cache, but this will not pick up those SQL statements that only reside in the cache for a very short period of time.

One should be able to optionally turn on IFICD 317 so that the SQL statement text is sent to SMF, along with the related IFCID 316 data, when the dynamic SQL statement is flushed from the cache. However, in itself, this request is not very useful. Assuming that the data being collected is going to eventually reside in some sort of data warehouse, we also need to have the following:

#1 A dynamic SQL statement identifier that is stable over time. A value that matches the QUERY_HASH column in SYSIBM.SYSQUERY would probably be ideal. The value should be sent to both the IFCID 316 and 317 record types, plus also to IFCID 63.

At present, if a dynamic SQL statement cycles in and out of the cache, or if it resides in the cache of separate DB2 systems, there is no way correlate the various IFCID 316 records. This makes it impossible to do historical analysis.

This is arguably outside the scope of this request, but the QUERY_HASH column should also reside in SYSIBM.SYSPACKSTMT. This would enable us to easily check newly bound static SQL statements to see if they already exist in some other program. If they do, and if we already have performance metrics about their usage, we will avoid having to do the access path analysis that we normally do for “new” SQL statements.

#2 Some way to send the contents of the dynamic SQL statement cache to SMF when a DB2 system is stopped. If we can't do this, then we won't get any performance information about the most frequently invoked dynamic SQL statements, which are arguably the ones that we care about the most.

Even if we have this, we will still lose data if the DB2 system crashes are hard. But a system crash is very infrequent, so we can ignore this issue.

#3 Some way to periodically dump the usage metrics in the cache (i.e. IFICD 316 data only, or IFCID 316 & 317 data) and send them to SMF – similar to how the EXPLAIN statement works today. This will enable us to track changes over time in the activity, or performance, of those dynamic SQL statements that reside in the cache for a very long time. For example, we might dump the IFCID 316 data hourly.

This feature will enable us to get some usage metrics about those dynamic SQL statements that reside in the cache for a long time – even if the DB2 system does subsequently crash.

#4 Some way to know if the access path for a given dynamic SQL statement has changed over time. For example, the cache could also contain a value that was the HASH of the access path. If we saw a SQL statement (identified using the QUERY_HASH value) that had a changed access path, we would investigate closely.

The SYSIBM.SYSPACKSTMT table should also have the access path hash value – to simplify the searching for changed access paths (e.g. after a rebind). It can also be used to efficiently search for syntactically different SQL statements that have the same access path.

#5 Of course, none of the above is useful unless OMEGAMON, or some other product, is updated to enable the enable the data to be extracted from SMF and loaded into a data warehouse.