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 IC84357 Status: Geschlossen

REPLICATED MQT NOT MATCHED FOR INSERT-FROM-SELECT WHEN SELECT QUERIES UNION
ALL VIEW WITH EXISTS PREDICATE

Produkt:
DB2 FOR LUW / DB2FORLUW / A10 - DB2
Problembeschreibung:
A replicated MQT is not matched for an insert-from-select. In 
the explain plan, EXP0060W is reported for the replicated MQT. 
 
Some necessary conditions to hit this problem are: 
1. It's an INSERT statement. 
2. The INSERT statement source subquery has an EXISTS predicate 
that references a base table with an MQT created on top. 
3. The INSERT statement source subquery queries a UNION ALL 
view, and the EXISTS predicate is applied on that UNION ALL 
view. 
4. The UNION ALL has non-deterministic or side-effect 
expression, such as RAND() in example below. 
 
Example: 
 
create table dim1 ( col1 int not null, col2 int); 
create table dim2 ( col1 int not null, col2 int); 
 
create table fact_1 ( col1 int, col2 int, col3 int, col4 int, 
col5 int ) DISTRIBUTE BY HASH("COL1") ; 
create table fact_2 ( col1 int, col2 int, col3 int, col4 int, 
col5 int ) DISTRIBUTE BY HASH("COL1") ; 
 
create view fact_all as ( 
select * from ( 
select fact_1.* from fact_1, dim2 where fact_1.col1 = dim2.col1 
union all 
select fact_2.* from fact_2, dim2 where fact_2.col1 = dim2.col1 
) 
where CASE WHEN 1 = 0 THEN RAND () ELSE 1 END = 1); 
 
create table dim1_rep as ( select col1 from dim1 ) data 
initially deferred refresh deferred replicated; 
refresh table dim1_rep; 
set current refresh age any; 
 
create table tab2 (tmp_col int); 
 
 
 
For the following INSERT statement, dim1_rep is not matched. 
EXP0060W is caught in db2exfmt plan. 
 
insert into tab2 
select count(*) 
from fact_all f 
where exists (select 1 from dim1 d1 where d1.col1 = f.col1);
Problem-Zusammenfassung:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Update to DB2 v10.1 Fix Pack 1                               * 
****************************************************************
Local-Fix:
N/A
verfügbare FixPacks:
DB2 Version 10.1 Fix Pack 1 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 2 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 4 for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 3a for Linux, UNIX, and Windows
DB2 Version 10.1 Fix Pack 6 for Linux, UNIX, and Windows

Lösung
First fixed in DB2 v10.1 Fix Pack 1
Workaround
keiner bekannt / siehe Local-Fix
Weitere Daten
Datum - Problem gemeldet    :
Datum - Problem geschlossen :
Datum - der letzten Änderung:
13.06.2012
02.11.2012
02.11.2012
Problem behoben ab folgender Versionen (IBM BugInfos)
Problem behoben lt. FixList in der Version
10.1.0.1 FixList
10.5.0.1 FixList