READBUFF= LIBNAME Statement Option

Specifies the number of rows of data to read into the buffer.

Valid in: LIBNAME statement
Default: DBMS-specific
Supports: All

Syntax

READBUFF= integer

Syntax Description

integer

is the positive number of rows to hold in memory. SAS allows the maximum number that is allowed by the database.

Details

This option improves performance by specifying a number of rows that can be held in memory for input into SAS. Buffering data reads can decrease network activities and increase performance. However, because SAS stores the rows in memory, higher values for READBUFF= use more memory. In addition, if too many rows are selected at once, then the rows that are returned to the SAS application might be out of date. For example, if someone else modifies the rows, you do not see the changes.
When READBUFF=1, only one row is retrieved at a time. The higher the value for READBUFF=, the more rows are retrieved in one fetch operation. If READBUFF= is not set, certain operations such as SQL SELECT statements cause the number of rows to be set to the client's default value, which for the engine is one row at a time. Setting READBUFF=128 can significantly boost the application's performance.
If you do not specify a value with this option, the engine calculates the buffer size based on the row length of your data (with a minimum of 10) and retrieves the number of rows in each fetch operation.

See Also

To apply this option to an individual table, use the READBUFF= data set option.