Yes it does and it is important that you use parameter makers. Dynamic SQL Cache became available in DB2 V7.1. Unlike static SQL which is externalized to a DBRM library, dynamic SQL must be prepared by what is known as a mini-bind prior to execution. The mini-bind process may adds overhead to the SQL call with DB2 parsing, validating, and selecting the optimal path for the call. In order to take full advantage of this feature it is important not to flood DB2 with new SQL calls as a result of coding literals within the SQL call. Using parameter markers add an additional level of complexity to programming, but the performance benefits significantly outweigh the effort.
class=MsoNormal>SELECT LAST_NAME, FIRST_NAME
WHERE EMPLOYEE_ID = ?
After statement preparation and before execution, parameter #1 would be set to the appropriate look-up value using the appropriate method and syntax for the programming language.