In this blog post, let’s learn about the error message “2104 This query could not be compiled for one of two reasons: a) incompatible Control Query Shape (CQS) specifications, or b) ‘MEDIUM’ optimization level is not sufficient to satisfy the CQS in effect. Suggestion: a) inspect the CQS in effect; or b) raise the optimization level to ‘MAXIMUM’. Note that for this query, ‘MAXIMUM’ optimization level may result in a long compile time.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.
Error Message
2104 This query could not be compiled for one of two reasons: a) incompatible Control Query Shape (CQS) specifications, or b) ‘MEDIUM’ optimization level is not sufficient to satisfy the CQS in effect. Suggestion: a) inspect the CQS in effect; or b) raise the optimization level to ‘MAXIMUM’. Note that for this query, ‘MAXIMUM’ optimization level may result in a long compile time.
Reason for the Error
NonStop SQL/MX was unable to compile this query, either because it was not able to use the MEDIUM optimization level or because you used an incompatible CONTROL QUERY SHAPE specification.
Solution
If applicable, use the MAXIMUM optimization level, correct the CONTROL QUERY SHAPE specification, and resubmit