DB2 - Problem description
Problem IC84597 | 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 / A10 - 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 10.1 Fix Pack 1 * **************************************************************** | |
Local Fix: | |
available fix packs: | |
DB2 Version 10.1 Fix Pack 1 for Linux, UNIX, and Windows | |
Solution | |
Problem was first fixed in DB2 version 10.1 Fix Pack 1 | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 14.06.2012 31.10.2012 31.10.2012 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.1.0.1 | |
10.5.0.1 |