DB2 - Problem description
Problem IT02369 | Status: Closed |
DB2 OPTIMIZER MIGHT NOT MATCH A STRING LITERAL WITH VALUES IN DISTRIBUTION STATS IN SOME RARE CASES | |
product: | |
DB2 FOR LUW / DB2FORLUW / A50 - DB2 | |
Problem description: | |
DB2 optimizer might not match a string literal with values in distribution stats in some rare cases. The problem can happen on CHAR() or VARCHAR() data type columns only, and when the following conditions are met: - The length of the literal is greater than 33 - The high2key and low2key values of the column have a common prefix, and the length of the common prefix is greater than 25. - The length of literal is 8 bytes or more greater than the length of the common prefix For example: A table contains the following data, and distribution statistics are collected. - 10 rows of value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef11111111' - 1 row of value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef22222222' - 1 row of value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef33333333' - 1 row of value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef44444444' query: select * from mytable where c = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdef11111111' DB2 optimizer might not be able to match the literal in the query with the frequent values. As a result, it might estimate inaccurate cardinality: Rows RETURN ( 1) Cost I/O | 1 TBSCAN ( 2) 10.0244 1 | 13 TABLE: DB2INST1 MYTABLE Q1 | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * See Error Description * **************************************************************** * RECOMMENDATION: * * Upgrade to DB2 Version 10.5 Fixpack 5. * **************************************************************** | |
Local Fix: | |
Solution | |
First fixed in Version 10.5 Fixpack 5. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 10.06.2014 18.03.2015 18.03.2015 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
10.5.0.5 |