setFetchSize(int rows)

Syntax:

void setFetchSize(int rows)
                  throws SQLException

Description:

Gives the JDBC driver a hint as to the number of rows that should be fetched from the database when more rows are needed for ResultSet objects generated by this Statement. If the value specified is zero, then the hint is ignored. The default value is zero.

Parameters:

rows

the number of rows to fetch

Throws:

SQLException - if a database access error occurs, if rows is less than 0 or greater than the maximum rows (see Statement.setMaxRows), or the statement has been closed.

Reference:

For more information, reference JDBC documentation for: Statement.setFetchSize(int)