Does the CLI use Extended Dynamic SQL?
No. Extended dynamic SQL is a type of SQL processing in which prepared statements are stored away for future use, without the need for a re-prepare. The CLI does not use this technique. Every statement that needs to be processed must either be prepared each time, or executed directly using SQLExecDirect. However, for performance reasons, the SQL engine has a prepared statement cache, which allows some programs to behave more like extended dynamic SQL. Using the cache, the SQL engine stores away information about prepared statements, and keeps this information in system-wide storage. Then, when the same statement is executed again, even if its by a different user and a different job, the statement will run much faster. This is because the information stored away, such as internal structures, and optimizer information, can sometimes be very CPU-intensive to reconstruct every time. Storing the information for reuse saves system resources, and speeds up CLI applications that use the same S