DB2 LUW Case Sensitivity
Every now and again I come across a problem query that involves case sensivity. I noticed a steady increase in CPU usage of about 5% since this past Thursday. Suspecting a code change was introduced unbeknownst to me, I had one of my guys take a look. We found a query running with a LOWER function in the where-clause. This was an often executed query and the optimizer had chosen a table scan. So knowing how to fix this from years of experience, we created a generated column on the column in question and voila, index only access! Problem fixed. This is 9.7, in 10.5 we can create a function-based index also. This is a link to a nice Developer works article by a friend from the lab. http://www.ibm.com/developerworks/data/library/techarticle/0203adamache/0203adamache.html