Default buffer size
The client application sends the prepared statement that is associated with the cursor to the database server and requests DESCRIBE information about the statement. If the cursor has an associated prepared statement, makes this request when the PREPARE statement executes. If the cursor does not have an associated statement, makes the request when the DECLARE statement executes.
When it receives this request, the database server sends the DESCRIBE
information about each column in the projection list to the application.
With this information, can
determine the size of a row of data. By default, sizes this cursor
buffer to hold one row of data. It uses the following algorithm to
determine the default size of the cursor buffer:
- If one row fits in a 4096-byte buffer, the default buffer size is 4096 bytes (4 kilobytes).
- If the size of one row exceeds 4096 bytes, the default buffer size is the size of that row.
Once it has the buffer size, allocates the cursor buffer.