APAR status
Closed as program error.
Error description
An inefficient access path can be selected with a query containing OF1R. Db2 may choose a sparse index plan when an an equal unique index exists. Additional keywords and symptoms: SQLPERFORMANCE SQLSPARSEINDEX SQLOF1R
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: * * All users of DB2 11 or 12 for z/OS * * who run queries with an OPTIMIZE FOR * * 1 ROW or FETCH FIRST 1 ROW ONLY clause. * **************************************************************** * PROBLEM DESCRIPTION: * * For queries with an OPTIMIZE FOR 1 * * ROW or FETCH FIRST 1 ROW ONLY clause, * * DB2 may choose sparse index to access * * the inner table when there are index * * plans available with good matching * * predicates. It may cause a query * * performance problem. * * * * SQLACCESSPATH SQLFFNR * * SQLOFNR SQLSPARSEINDEX * * SPARSEINDEX SQLPERFORMANCE * **************************************************************** * RECOMMENDATION: * * Apply corrective PTF when available * **************************************************************** For queries with an OPTIMIZE FOR 1 ROW or FETCH FIRST 1 ROW ONLY clause, DB2 may choose sparse index to access the inner table when there are index plans available with good matching predicates. Compared with an index plan with good matching predicates, the sparse index plan cannot fetch the first several rows as efficiently. Therefore it should not get a cost reduction for the OPTIMIZE FOR 1 ROW or FETCH FIRST 1 ROW ONLY clause.
Problem conclusion
The problem of the incorrect cost reduction for a sparse index plan is fixed by recognizing that the index plan with good matching predicates exists.
Temporary fix
Comments
APAR Information
APAR number
PI86134
Reported component name
DB2 OS/390 & Z/
Reported component ID
5740XYR00
Reported release
B10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2017-08-21
Closed date
2017-12-27
Last modified date
2018-03-15
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
UI52926 UI52927
Modules/Macros
DSNXOCSC
Fix information
Fixed component name
DB2 OS/390 & Z/
Fixed component ID
5740XYR00
Applicable component levels
RB10 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEPEK","label":"Db2 for z\/OS"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}},{"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Product":{"code":"SG19M","label":"APARs - z\/OS environment"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.0","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
15 March 2018