DB2 - Problem description
Problem IC79173 | Status: Closed |
DB2 SQL Optimizer might choose a suboptimal access plan for query with 'OPTIMIZE FOR N ROWS' clause and IS NULL predicate | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
For a query with an 'optimize for N rows' clause and a highly filtering IS NULL predicate, the DB2 SQL Optimizer might choose a suboptimal query access plan as in the following example: select * from fact left outer join d1 on f1 = id1 left outer join d2 on f2 = id2 left outer join d3 on f3 = id3 left outer join d4 on f4 = id4 where d3.c31 is null; with access plan graph for this query ( db2exfmt output ): RETURN | >HSJOIN /--------+---------\ >HSJOIN TBSCAN /-------+-------\ | >HSJOIN TBSCAN D4 /---+----\ | FILTER TBSCAN D2 | | >HSJOIN D1 /-----+------\ TBSCAN TBSCAN | | FACT D3 The IS NULL predicate is applied by the FILTER. The MAXPAGES argument described in the details of the TBSCAN operator(s) below the FILTER is a potential indicator of the problem. If the MAXPAGES argument is small and the IS NULL predicate is filtering many records, then a large amount of synchronous IO might be required, resulting in suboptimal performance. | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 version 9.7 Fix Pack 6 * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 version 9.7 Fix Pack 6 | |
Workaround | |
not known / see Local fix | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC84597 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 11.10.2011 14.06.2012 14.06.2012 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP6 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.6 |