If CLIENT_NO in production has this 3 values only, too,
DB2 knows that from the statictics and will not use the index,
but use TS scan instead, no matter if you code the WHERE condition
for CLIENT_NO or not ... because the filter factor is 100 % and DB2 doesn't
get any profit from using the index ... TS scan is faster in this case.
So of course you get the same run time ... TS scan in both cases.
Kind regards
Bernd
Am 04.01.2015 um 04:26 schrieb T.W.:
>
> I tried running the original SQL in our dev and acceptance test systems with
> and without the CLIENT_NO in the WHERE. I saw no difference in the run time.
> Doing a TS scan or using an index both woked.
>
> The tables get reorged on Sunday. Monday I will have them try this again in
> production and watch it in Mainview.
>
>
|