Problem solve Get help with specific problems with your technologies, process and projects.

Are parameter markers the best course?

Read how parameter markers are the easiest way to implement "host variable"-like processing with dynamic SQL.

In most of the DB2 manuals, it is recommended to use parameter markers for dynamic SQL statements. If I modify COBOL applications to use parameter markers instead of new literals each time, will it help in improving the overall performance of the applications. Also, if I start using parameter markers, would it be judicious to increase the existing size of EDM pool to make effective use of dynamic statement caching?
Parameter markers are the easiest way to implement "host variable" like processing with dynamic SQL. One of the benefits of using a parameter marker instead of a literal is that DB2 can continue to use the mini-plan in the EDM pool if you are using dynamic statement caching (DSC). For DSC to work, the dynamic SQL statement has to be EXACTLY the same each time it is run. Changing the literal value changes the SQL statement and requires a rebind. Of course, you might want that if you expect the access path to change based on skewed values.

Dig Deeper on IBM DB2 management

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.