Hi,
I am trying to investigate if some of our fairly complex views
couldn't be materialised with MQT's.
Unfortunately the error message returned when the fullselect is
invalid is as
shown at the bottom of this post.
This message does little/nothing to help me(the user) understand what
is precluding the MQT. I then have to wade through all the if-buts
etc... to do with MQTs (very time consuming!)
Couldn't a more useful message of exactly why the definition is
unacceptable
be given? Surely, db2 knows exactly what the rule that has been broken
is ?
Thanks.
Paul
"SQL20058N The fullselect specified for the materialized query
table "<table-name>" is not valid.
Explanation:
The materialized query table definition has specific rules
regarding the contents of the fullselect. Some rules are based
on the materialized query table options (REFRESH DEFERRED or
REFRESH IMMEDIATE) while others are based on whether or not the
table is replicated. The fullselect in the CREATE TABLE
statement that returned this condition violates at least one of
the rules as described in the SQL Reference.
The statement cannot be processed.
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. "
I am trying to investigate if some of our fairly complex views
couldn't be materialised with MQT's.
Unfortunately the error message returned when the fullselect is
invalid is as
shown at the bottom of this post.
This message does little/nothing to help me(the user) understand what
is precluding the MQT. I then have to wade through all the if-buts
etc... to do with MQTs (very time consuming!)
Couldn't a more useful message of exactly why the definition is
unacceptable
be given? Surely, db2 knows exactly what the rule that has been broken
is ?
Thanks.
Paul
"SQL20058N The fullselect specified for the materialized query
table "<table-name>" is not valid.
Explanation:
The materialized query table definition has specific rules
regarding the contents of the fullselect. Some rules are based
on the materialized query table options (REFRESH DEFERRED or
REFRESH IMMEDIATE) while others are based on whether or not the
table is replicated. The fullselect in the CREATE TABLE
statement that returned this condition violates at least one of
the rules as described in the SQL Reference.
The statement cannot be processed.
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. "
Comment