Cursor Performance

When you use the Statement.setCursorName method or the setFetchSize( ) method in the SybCursorResultSet class, jConnect creates a cursor in the database.

Other methods cause jConnect to open, fetch, and update a cursor.

jConnect creates and manipulates cursors either by sending SQL statements to the database or by encoding cursor commands as tokens within the TDS communication protocol. Cursors of the first type are language cursors, cursors of the second type are protocol cursors.

Protocol cursors provide better performance than language cursors. In addition, not all databases support language cursors. For example, SQL Anywhere databases do not support language cursors.

In jConnect, the default condition is for all cursors to be protocol cursors. However, the LANGUAGE_CURSOR connection property lets you use language commands in the database to create and manipulate cursors.