DB2 - Problem description
Problem IC63227 | Status: Closed |
DB2 QUERY REWRITE MAY NOT COMPLETELY OPTIMIZE A QUERY CONTAINING NODENUMBER LOCAL PREDICATE | |
product: | |
DB2 FOR LUW / DB2FORLUW / 950 - DB2 | |
Problem description: | |
DB2 Query ReWrite (QRW) may not completely optimize a query containing a nodenumber local predicate on a base table. This optimization is only valid if the following conditions are satisfied: 1. There is a pair of Base Tables. 2. The two Base Tables have the same partitioning map id 3. The tables have equality join predicate on all the columns of the partitioning keys of the tables. 4. Each column of the partitioning key of the first table must join to the column of the same order of the partitioning keys of the other table 5. There is a local predicate of the form, NODENUMBER(<table>.<col>)=<x> where <x> can be a constant, host variable, parameter marker or a special register. Sample Query: create table T1(c11 int,c12 int,c13 int,c14 int) distribute by (c12,c13); create table T2(c21 int,c22 int,c23 int,c24 int) distribute by (c22,c23); before fix: select * from t1,t2 where nodenumber(t1.c11) = 0 and t1.c12 = t2.c22 and t1.c13 = t2.c23; after fix: select * from t1,t2 where nodenumber(t1.c11) = 0 and t1.c12 = t2.c22 and t1.c13 = t2.c23 and nodenumber(t2.<any col>) = 0; | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Problem Description above. * **************************************************************** * RECOMMENDATION: * * Upgrade to Version 9.5 Fix Pack 6. * **************************************************************** | |
Local Fix: | |
Manually rewrite query with additional local predicate nodenumber(<table>.<col>)=<x> on other table. | |
available fix packs: | |
DB2 Version 9.5 Fix Pack 6a for Linux, UNIX, and Windows | |
Solution | |
First fixed in DB2 Version 9.5 Fix Pack 6. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 16.09.2009 10.06.2010 10.06.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.5.FP6 | |
Problem solved according to the fixlist(s) of the following version(s) |