In this blog post, let’s learn about the error message “2111 Statement was compiled as if optimization level were ‘MEDIUM’.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.
Error Message
2111 Statement was compiled as if optimization level were ‘MEDIUM’.
Reason for the Error
The SQL/MX compiler attempted to compile this query with maximum optimization level but failed. It then successfully compiled this query with medium optimization level.
Solution
This is an informational message. The statement was too complex to be compiled with maximum optimization level and the compiler ran out of memory trying to do so. So, it recompiled the statement with medium optimization level. To prevent this warning, set the optimization level to medium or low