home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Neueste VersionenFixList
11.1.0.7 FixList
10.5.0.9 FixList
10.1.0.6 FixList
9.8.0.5 FixList
9.7.0.11 FixList
9.5.0.10 FixList
9.1.0.12 FixList
Haben Sie Probleme? - Kontaktieren Sie uns.
Kostenlos registrieren anmeldung-x26
Kontaktformular kontakt-x26

DB2 - Problembeschreibung

Problem IC64692 Status: Geschlossen

OPTIMIZE A TYPE OF STAR SCHEMA OUTER JOIN QUERY TO DO EARLY FACT TABLE
GROUP BY.

Produkt:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problembeschreibung:
Improve the optimization of start schema outer join query that 
has outer join of fact table and dimension tables and group by 
columns including all join key. The fact table group by operator 
can be executed prior to the table join operator. 
 
Here is an example scenario: 
 
-- FACT and DIMENSION TABLE 
create table dim1 (id1 int not null primary key, c11 int); 
create table dim2 (id2 int not null primary key, c21 int); 
create table fact (id1 int not null, id2 int not null, sale 
int); 
 
-- Referential Integrity 
alter table fact add constraint fk1 foreign key (id1) references 
dim1(id1); 
alter table fact add constraint fk2 foreign key (id2) references 
dim2(id2); 
 
-- QUERY 
select fact.id1, fact.id2, c11, c21, sum(sale) 
from fact left join dim1 on fact.id1=dim1.id1 left join dim2 on 
fact.id2=dim2.id2 
group by fact.id1, fact.id2, c11, c21; 
 
In query access plan, operator GRPBY used to be seen above JOIN 
among FACT, DIM1 and DIM2. With the fix, there still be one 
GRPBY operator but it will be done after TBSCAN or IXSCAN of 
FACT and before any join operator.
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All users of V9.7 on Linux, Unix and Windows platforms.      * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* Improve the optimization of start schema outer join query    * 
* that has outer join of fact table and dimension tables and   * 
* group by columns including all join key. The fact table      * 
* group by operator can be executed prior to the table join    * 
* operator.                                                    * 
*                                                              * 
* Here is an example scenario:                                 * 
*                                                              * 
* -- FACT and DIMENSION TABLE                                  * 
* create table dim1 (id1 int not null primary key, c11 int);   * 
* create table dim2 (id2 int not null primary key, c21 int);   * 
* create table fact (id1 int not null, id2 int not null, sale  * 
* int);                                                        * 
*                                                              * 
* -- Referential Integrity                                     * 
* alter table fact add constraint fk1 foreign key (id1)        * 
* references dim1(id1);                                        * 
* alter table fact add constraint fk2 foreign key (id2)        * 
* references dim2(id2);                                        * 
*                                                              * 
* -- QUERY                                                     * 
* select fact.id1, fact.id2, c11, c21, sum(sale)               * 
* from fact left join dim1 on fact.id1=dim1.id1 left join dim2 * 
* on fact.id2=dim2.id2                                         * 
* group by fact.id1, fact.id2, c11, c21;                       * 
*                                                              * 
* In query access plan, operator GRPBY used to be seen above   * 
* JOIN among FACT, DIM1 and DIM2. With the fix, there still be * 
* one GRPBY operator but it will be done after TBSCAN or       * 
* IXSCAN of FACT and before any join operator.                 * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Upgrade to DB2 UDB Version 9.7 FixPak 1 or higher levels.    * 
****************************************************************
Local-Fix:
Manually replace "left join" with "inner join" in the query 
statement.
verfügbare FixPacks:
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 5 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 7 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9a for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 6 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 8 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 9 for Linux, UNIX, and Windows
DB2 Version 9.7 Fix Pack 10 for Linux, UNIX, and Windows

Lösung
First fixed in DB2 UDB Version 9.7 FixPak 1.
Workaround
Manually replace "left join" with "inner join" in the query 
statement.
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
19.11.2009
17.12.2009
17.12.2009
Problem behoben ab folgender Versionen (IBM BugInfos)
9.7.
Problem behoben lt. FixList in der Version
9.7.0.1 FixList