Problem:
Can I improve my SQL Server performance from COBOL via ODBC?
This relates specifcally to SQL Server cursor performamce.
Resolution:
Using ODBC to SQL Server there is a lot of scope for tuning your performance. MS SQL Server's performance can vary greatly depending on what cursor type is being used.
By default all cursors are Server Side cursors. This can be inefficient for example when reading through large sets of data. Setting concurrency to READONLY and making it FORWARD only should those type of cursors go much faster.
Where you need server side cursors you could try the SQL(PREFETCH=n) directive. This will get individual rows in blocks rather than in a single row. This can speed up performance.
Some work has taken place to help with people migrating from mainframes. There is a new compiler directive SQL(BEHAVIOR=....). This allow you to specify what behaviors you want and it then does some optimisations to cursor types.
Some experimentations should help you get better performance.
