IBM Support

MA47373 - OSP-OTHER-PERFM OPNQRYF ACCESS PLAN STARTED USING AN INDEX
PROBE VS SPARSE MTI AND PERFORMING POORLY.

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 APAR (Authorized Program Analysis Report)

Abstract

OSP-OTHER-PERFM OPNQRYF ACCESS PLAN STARTED USING AN INDEX
PROBE VS SPARSE MTI AND PERFORMING POORLY.

Error Description

OPNQRYF with two selection predicates in the QRYSLT parameter  
and ordering was previously using a sparse MTI in the access    
plan. The MTI covered both predicates in the QRYSLT parameter.  
The query started performing poorly after the access plan      
switched to using an Index Probe on a permanent index.          

Problem Summary

Please see the ERROR DESCRIPTION section.                      

Problem Conclusion

In a prior PTF of R720 Database Group 23/24, the optimizer      
made a policy change to favor an existing permanent indexes that
can service the order by and at least one probe predicate over a
SPARSE MTI (temporary index) when running with ALWCPYDTA *NO    
query request. This is because there is overhead to sparse MTIs
(temporary indexes that are not shared) when it comes to        
managing them as they can accumulate on a table when there are  
many open cursors. That same logic, to consider a sparse MTI    
for ordering is also used for native query requests like        
OPNQRYF. In the native query situations however , it is not    
just alwcpydta *NO queries that consider sparse MTIs but        
actually any updateable query or one run with ALWCPYDTA(*YES)  
as well. This preference for permanent indexes vs MTI indexes  
in the implementation of these native query requests can cause  
poor plans if the permanent index does not provide adequate    
probe coverage. As a result, this HPER PTF will take native    
query requests out of this policy change.                      
ALWCPYDTA *NO is relatively rare in SQL queries                
environments, but the consideration for Sparse MTIs has always  
been more broadly considered in the native query environment    
(like OPNQRYF) and this change moves that consideration back in
to the logic. This fix only applies to R720.                    

Temporary Fix

Comments

Circumvention


PTFs Available

R720 MF65524  9123

R730 MF67124  0310

Affected Modules


         
         

Affected Publications

Summary Information

Status............................................CLOSED PER
HIPER...........................................Yes
Component..................................9400DG3DB
Failing Module..........................RCHMGR
Reported Release...................R720
Duplicate Of..............................




IBM i Support

IBM disclaims all warranties, whether express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. By furnishing this document, IBM grants no licenses to any related patents or copyrights. Copyright © 1996,1997,1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 IBM Corporation. Any trademarks and product or brand names referenced in this document are the property of their respective owners. Consult the Terms of use link for trademark information

[{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2; 7.3; 7.4","Product":{"code":"SG15Q","label":"APARs - OS\/400 General"},"Component":"9400DG3","Edition":""},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2; 7.3; 7.4","Product":{"code":"SG16E","label":"APARs - IBM i 7.2 environment"},"Component":"9400DG3","Edition":""},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2; 7.3; 7.4","Product":{"code":"SG16G","label":"APARs - IBM i 7.3 environment"},"Component":"9400DG3","Edition":""},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.2; 7.3; 7.4","Product":{"code":"SS9QQS","label":"IBM i 7.4"},"Component":"9400DG3","Edition":""}]

Document Information

Modified date:
13 November 2020