Thanks for the advice. I should have stated this in the original post:
We ran runstats after creating the indexes. The table has approximately 500,000 rows and is expected to grow to around 4 million ones it reaches saturation in production (we are expanding the amount of history being stored).
The union form of the query runs for about .25 seconds and the OR version runs for about 20 seconds.
As you would expect from those numbers, explain is indicating that the indexes are being used for the union query but not for the OR query.
It the ALT_VALUE_COL does have a high occurrence of null values, so that might be why it is electing to go with a full table scan.
Here are the SYSIBM.SYSINDEXES values for the VALUE_COL and ALT_VALUE_COL indexes:
Code:
NAME FIRSTKEYCARD FULLKEYCARD NLEAF NLEVELS
FCX01708 396072 396072 3351 3
FCX01709 1 1 947 3
I apologize, my DB2 optimization knowledge is limited and my DBA has not been helpful on this problem, so I'm at a bit of a loss.
Any help is greatly appreciated.