quick question hopefully.
we can get the current timestamp using sysibm.sysdummy1 and that works ok, but we were advised that after v8 implementation, this table/option wouldnt be available (presumably the advisor assumed it wouldnt work with unicode or something...the manual sais its still ebcidic). - I know this isnt true!!
anyway, we assumed that using
"select current timestamp" from any DB2 table would return the same result and it worked perfectly. What we didnt notice was that the result seems to be being obtained by doing a full index scan. This is ok in test where there's a low number of rows, but as soon as it went live, it tried to scan 200 million rows and obviously took a while..
so the question is, why is it trying to do an index scan and not just returning the current timestamp as it would from sysdummy?