Skip to Main Content
IBM Power Ideas Portal

This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. 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 (

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
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.

Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal ( - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal ( - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM. - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Delivered
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Jul 8, 2016

sql function - allow to define the scope of deterministic

if I have understand correctly, setting deterministic a function when I create it means that sql can cache the results to improve performance.

the sql cache is purged by the IPL. so this means that the scope of deterministic for a sql function is the IPL.

The sql registry, the sql global variable and some sql function provided by IBM have a different deterministic scope, and this is well documented in the sql reference.
for example :
"The VERIFY_GROUP_FOR_USER function is deterministic within a connection"

the ability to define the scope of deterministic of a function is an excellent method to permit a function to give the correct result, and to allow sql to use the sql cache as often as possible.

today, when the deterministic scope of a user function is not the IPL, then the function should be created as not deterministic, and cannot be used in a mask or a permission.

being able to scope deterministic allow a better tuning, then better performance.

I suggest these levels of scope :
- IPL (the current level)
- job
- connection (such as VERIFY_GROUP_FOR_USER)
- statement (such as registry TIMESTAMP)
- UserDemand
This last one is a way for an application to signal to the sql cache it should selectively purge the cache
for example
when I do a CHGUSRPRF USRPRF(MYPRF) GRPPRF(xxx , then the cache of
is purged, then the next call to VERIFY_GROUP_FOR_USER('MYPRF'
returns the correct result.

Use Case:

allow a not deterministic function to be a few deterministic

Idea priority Medium
  • Guest
    Nov 30, 2016

    Thank you for the requirement. We have improvement the deterministic support for functions in IBM i 7.2 and above. Download and installed the latest DB2 PTF Group to receive the improvement.

    The enhancement is that you now have the ability to declare a function as STATEMENT DETERMINISTIC.
    When a function cannot be declared as DETERMINISTIC, look at using statement level deterministic.
    We do not have SESSION DETERMINISTIC support.
    Regards, Scott!/wiki/IBM%20i%20Technology%20Updates/page/Statement%20deterministic%20functions

  • Guest
    Jul 9, 2016

    Creating a new RFE based on Community RFE #91198 in product IBM i.