CursorBufferSize Property
CursorBufferSize
The cursor buffer size (measured in the number of rows).
Only positive values are allowed.
Defaults to 4096
.
Declaration
public int CursorBufferSize { get; set; }
Property Value
int |
Remarks
When a statement is submitted for execution, a SqlQueryResult is returned as a result. When rows are ready to be consumed, they are put into an internal buffer of the cursor. This parameter defines the maximum number of rows in that buffer. When the threshold is reached, the backpressure mechanism will slow down the execution, possibly to a complete halt, to prevent out-of-memory.
The default value is expected to work well for most workloads. A bigger buffer size may give you a slight performance boost for queries with large result sets at the cost of increased memory consumption.