DB2 - Problembeschreibung
Problem IT10563 | Status: Geschlossen |
DB2 might produce a sub-optimal plan for query with group by over NULL constant | |
Produkt: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problembeschreibung: | |
Queries containing NULL constant values as an argument to SUM/MIN/MAX aggregation function can experience poor performance when the tables are defined with the ORGANIZE BY COLUMN attribute. DB2 will improve the performance of queries with the following pattern: 1) The query contains one or more of SUM/MAX/MIN aggregation functions 2) The input to these functions is a NULL constant or another function that can be simplified to a NULL constant such as CASE expression. Example: Original query: select sum(null) from ta Optimized statement will show an absence of Group By. SELECT NULL FROM (SELECT $RID$ FROM (SELECT $RID$ FROM TA AS Q1 ) AS Q2 ) AS Q3 | |
Problem-Zusammenfassung: | |
**************************************************************** * USERS AFFECTED: * * engn_sqnr * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 v10.5 fixpak 7. * **************************************************************** | |
Local-Fix: | |
Rewrite the query to remove the grouping function with NULL from the query and specifying NULL itself in the select list. Thus the example query will be: select null from ta; | |
Lösung | |
First fixed in DB2 v10.5 fixpak 7. | |
Workaround | |
keiner bekannt / siehe Local-Fix | |
Weitere Daten | |
Datum - Problem gemeldet : Datum - Problem geschlossen : Datum - der letzten Änderung: | 07.08.2015 20.01.2016 20.01.2016 |
Problem behoben ab folgender Versionen (IBM BugInfos) | |
Problem behoben lt. FixList in der Version | |
10.5.0.7 |