HIGH2KEY and LOW2KEY

teldb2kals

HIGH2KEY and LOW2KEY
Hi,

I have a doubt on HIGH2KEY and LOW2KEY.

With a colcardf = 2, can high2key be equal to low2key ? And, can high2key
be greater than low2key for colcardf=2 ?

One of our table columns has two distinct values, 'AAA' and 'BBB', and the
stats should normally have high2key='AAA' and low2key='BBB'. This was true
till about 2 weeks back. Last week it showed high2key=low2key='AAA', with a
colcardf=2, and this week it shows high2key='BBB' and low2key='AAA', again
with a colcard=2.

A few of our programs accessing a view which uses this column in the where
clause (WHERE col1='BBB'), had their accesspaths changed, and after a bit
of hunting around, we found it was due to SYSCOLUMNS having
HIGH2KEY=LOW2KEY='AAA' for the column. Stats had been run just an hour
before the bind was done. We don't generally update catalog stats manually
here. I manually updated low2key='BBB', and the accesspath reverted back to
the way it was before.

And, the next run of stats has now left high2key='BBB' and low2key='AAA'.

Could somebody shed some light on this ? I have currently bound the
programs using opthints to ensure right accesspath.

Thanks.

Regards,
Kal

---------------------------------------------------------------------------------
Welcome to the IDUG DB2-L list. To unsubscribe, go to the archives and home page at http://www.idugdb2-l.org/archives/db2-l.html. From that page select "Join or Leave the list". If you will be out of the office, send the SET DB2-L NO MAIL command to [login to unmask email] The IDUG List Admins can be reached at [login to unmask email] Find out the latest on IDUG conferences at http://conferences.idug.org/index.cfm