This technote caught my eye when @db2_support tweeted it the other day ago. It was titled as “DB2 might choose a sub-optimal query execution plan due to distribution statistics”. The title alone intrigued me. As I read through, I thought…
When does case matter in DB2? Well, it doesn’t unless it does. Nice and clear, huh? When Text Must be in the Correct Case Text must be in the correct case whenever it is part of a literal string. Things…
Like many applications, WebSphere Commerce puts all tables in USERSPACE1 unless they need larger page sizes. This actually works just fine for smaller and midrange implementations, but we have about one build a year that requires something else – either…
There are a a vast array of things you can do in SQL. But just because you can doesn’t always mean that you should. I recently ran into an interesting situation with FETCH FIRST ROW ONLY. How the Problem Manifested…
Sometimes just using the index advisor and a bit of common sense, you can address SQL performance issues. But other times, you have to dig a bit deeper. I recently found the following query and 300 of its closest cousins…
Recently, I needed to do some SQL profiling – discovering exactly what SQL a web application was executing against the database. I learned a lot, and when I learn a lot, I try to share with my readers. I went…
One of the top SQL tips on many lists for developers of SQL is to avoid applying a function to the table data. I think of this as avoiding funcitons on the left of my comparison operator (=, !=, ,…
Many times, the SQL analysis I do is extremely focused – mostly on SQL that is a proven resource hog or a suspected problem. Analyzing all SQL used in a particular process can be a bit different, and may not…
This series started with Explain Part 1 – Explain and the DB2 Optimizer. This is the second post in the series. I want to cover my favorite method for generating Explain Plans, and in the process, discuss some of the…
Generating an Explain Plan is easy… Properly reading an Explain Plan is harder… Taking appropriate action is harder still. When I started my career as a physical DBA with IBM Global Services, generating Explain Plans or even general analysis of…
I haven’t generally been known for my SQL tips. I can find my way around SQL decently enough, but for years, I didn’t do much of it. I’ve used it more and more as the years have gone by as…
This post comes out of one of the more challenging technical problems I have encountered recently. Problem Description An international client went live recently. We did the work of building their new WebSphere Commerce 7 website, and go-live involved loading…