What is the use of setFetchSize() and setMaxRows() methods of the JDBC Statement Interface?

JDBCJava 8MySQLMySQLi Database

The setFetchSize(int) method defines the number of rows that will be read from the database when the ResultSet needs more rows. setFetchSize(int) affects how the database returns the ResultSet data.

Whereas, setMaxRows(int) method of the ResultSet specifies how many rows a ResultSet can contain at a time. setMaxRows(int) affects the client side JDBC object.

raja
Published on 22-Mar-2019 15:21:21
Advertisements