dynamic sql caching & temporary table

ÖZGÜR ÖZEN

dynamic sql caching & temporary table
hi all,
We enabled the dynamic sql caching for the system and the package and can
see the cached statements in the edm pool and reuse them,
but when we try to cache a dynamic sql statement, which accesses a declared
temporary table,it didn't cache the statement.
Can't we cache these kind of statements?
thanks.



Max Scarpa

Re: dynamic sql caching & temporary table
(in response to ÖZGÜR ÖZEN)
Hi

From Red Book 'DB2 UDB Server for OS/390 Version 6 Technical Update' (if
you're in V6) chapter 3.3.5, pag 91:

"Please note that dynamic SQL statements that resolve to a declared
temporary
table are not placed in the dynamic statement cache. This is because every
transaction that defines a declared temporary table, defines its own
specific and
unique version of it ? even if the layout is identical. Similarly, it is
possible that
every transaction could define a table with the same name, but with a
different
definition. If the SQL were cached, an incorrect version of the table could
be
used."

HTH

Max Scarpa
From the Dark Side of IT