Calculating the I/O cost of a cursor

The cost estimate for processing a cursor is calculated at declare cursor time for all cursors except execute cursors, which is calculated when the cursor opens.

Preexecution resource limits on I/O cost are enforced at open cursorname time for all cursor types. The optimizer recalculates the limit value each time the user attempts to open the cursor.

An execution-time resource limit applies to the cumulative I/O cost of a cursor from the time the cursor opens to the time it closes. The optimizer recalculates the I/O limit each time a cursor opens.

See Chapter 18 “Cursors: Accessing Data,” in the Transact-SQL Users Guide.