Saturday 14 September 2013

DB2 Scrollable Cursor Guidelines.

The following guidelines are offered to help you implement effective scrollable cursor in your DB2 application programs.
  • Use Scrollable Cursor with caution. As helpful as scrollable cursor are, do not make every cursor a scrollable cursor. Scrollable cursor require substantially more overhead than a traditional, non-scrollable cursor. Always analyze the requirment of your applications and deploy scrollable cursor only where it make sense to do so.
  • No Scrollable cursor in Pseudo-Conversational CICS. Do not attempt to code scrollable cusror in a pseudo-conversational CICS program.
  • Use Dynamic Cursor to see changes. If you need to see the changes made to data by concurrent process, be sure to use a dynamic scrollable cursor. This is the only type of scrollable cursor that has visibility to underlying changes.
Note : Concurrent INSERT activity will not be visible to any scrollable cursor - only concurrent UPDATE and Delete activity can be made visible to the cursor.
Consider the following precautions as you decide cursor type for your application program.
  • If you do not need to move forward or backward through your result set, do not use a scrollable cursor.
  • If the query will cuse DB2 to materialized a result set, do not use dynamic scrollable cursor - it will not work.
  • If no concurrent update is possible, do not use a dynamic scrollable cursor.
  • If you want to see updates and delete but do not want to see newly inserted data, choose a STATIC SENSITIVE SCROLLABLE CURSOR.
  • If you do not want to see any modification, choose an INSENSITIVE scrollable cursor.


Created with Artisteer

No comments:

Post a Comment

New In-feed ads