On Apr 9, 7:22 pm, BD <robert.d...@gmail.comwrote:
Hi, all.
I'm trying to implement a REFRESH IMMEDIATE MQT to help with
performance of a particularly sluggish query.
I cannot create it with REFRESH IMMEDIATE, because of reason code
"10", whatever that is. I am able to implement it with REFRESH
DEFERRED, but that's not really suitable.
I need to get a handle on these reason codes.
I've checked the Master Index in the db2 docs, but have thus far
struck out.
I've Googled, and see explanations of various MQT failure reason
codes, but not "10".
Can anyone point me to a listing of these codes and their meanings?
I'm running 8.2 on LUW. Also needs to work on 8 for z/OS (cross-
platform development-yay).
Thanks for any pointers!
BD
The easiest way to look for info regarding error messages is to ask
db2 as in:
[db2inst1@wb-01 ~]$ db2 "? SQL20058N"
SQL20058N The fullselect specified for the materialized query
table "<table-name >" is not valid. Reason code =
"<reason-code>".
Explanation:
[...]
10 When REFRESH IMMEDIATE is specified and the FROM clause
references more than one table, only an inner join, without using
the explicit INNER JOIN syntax, is supported.
[...]
User Response:
Change the fullselect in the CREATE TABLE statement so that it
conforms to the rules based on the materialized query table
options and whether or not the materialized query table is
replicated.
The action corresponding to the reason code is:
[...]
10 Create the materialized query table as REFRESH DEFERRED, or
use an inner join without the explicit INNER JOIN syntax.
[...]
Regarding zos I don't know
/Lennart