-20279 THE VIEW view-name CANNOT BE ENABLED FOR QUERY OPTIMIZATION. REASON CODE = reason-code
Explanation
The view cannot allow the ENABLE QUERY OPTIMIZATION option because the fullselect does not conform to the set of queries that can take advantage of this capability.
- view-name
- The view that cannot be enabled for query optimization.
- reason-code
- The reason for the message or SQL code,
indicated by one of the following
values:
- 1
- The view directly or indirectly references an existing materialized query.
- 2
- The view references a random function or a function with external action.
- 3
- The view is inoperative.
System action
The statement cannot be processed.
Programmer response
Perform the action that corresponds to the reason code.
- 1
- Remove the reference to the materialized query table.
- 2
- Remove the following references from the query that defines the view:
- A reference to a random function
- A reference to a function with an external action
- 3
- Correct the condition that caused the view to be inoperative.
SQLSTATE
428G8