home clear 64x64
en blue 200x116 de orange 200x116 info letter User
suche 36x36
Latest versionsfixlist
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
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

DB2 - Problem description

Problem IC62904 Status: Closed

ISSUE EXP0059W FOR STATVIEWS WITH SELECT DISTINCT

product:
DB2 FOR LUW / DB2FORLUW / 970 - DB2
Problem description:
Diagnostic message EXP0059W will be logged to inform the 
statistical view can not be used for the query: 
 
-- statistical view definition 
create view sv as (select * from ta where a1 in (select b1 from 
tb)); 
-- query to be explained 
select * from ta where a1 in (select b1 from  tb); 
 
-- EXP0059W is dumped to indicate statistical view can not be 
used. 
EXP0059W  The following MQT or statistical view was 
  not eligible because of one or more of the 
 following reasons: (1) the MQT had extra table 
joins or GROUP BY columns that were not present in 
the query, or (2) the query had an SQL construct 
such as ORDER BY, FETCH FIRST n ROWS, DISTINCT, or 
had a subquery that could not be matched:
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* All                                                          * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* A EXP0059W  warning was not generated                        * 
*                                                              * 
* After support for select distinct in Cobra EXP0059W is not   * 
* issued for some statviews:                                   * 
*                                                              * 
* create table ta (a1 int, a2 int);                            * 
* create table tb (b1 int, b2 int);                            * 
* create view sv as (select * from ta where a1 in (select b1   * 
* from tb));                                                   * 
* alter view sv enable query optimization;                     * 
* explain plan for select * from ta where a1 in (select b1     * 
* from tb)                                                     * 
*                                                              * 
*                                                              * 
* Prior to V9.7, the following warning message is logged for   * 
* the GB statview matching failure:                            * 
* Diagnostic Details:  EXP0059W  The following MQT or          * 
* statistical view was                                         * 
*    not eligible because of one or more of the                * 
*    following reasons: (1) the MQT had extra table            * 
*    joins or GROUP BY columns that were not present in        * 
*    the query, or (2) the query had an SQL construct          * 
*    such as ORDER BY, FETCH FIRST n ROWS, DISTINCT, or        * 
*    had a subquery that could not be matched:                 * 
*    "USER"."SV".                                              * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* Apply FP1 if this becomes a serious issue.                   * 
****************************************************************
Local Fix:
available fix packs:
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

Solution
Fixed in FP1
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
01.09.2009
22.12.2009
22.12.2009
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
9.7.0.1 FixList