0

I'm using the following query/approach to export data to CSV 80,000 records

Statement statement = connection.createStatement();
statement.setFetchSize(500);
ResultSet resultSet = statement.executeQuery("SELECT * FROM EMPLOYEE");
while (resultSet .next()) {
     .......
}

Questions

1. Does the above fetchsize and resultset runs like this for every iteration -> 1st query 
   LIMIT 0, 500 2nd query (resultSet.next()) LIMIT 500, 1000 3rd 
   iteration/query/resultset.next LIMIT 1000, 1500......
2. Is the above like pagination query which usually comes from front-end to back-end via UI ?
3. Also, What is the difference between SELECT * from EMPLOYEE limit 0,500 (vs) SELECT * FROM 
   EMPLOYEE LIMIT 20 OFFSET 0

Thanks

0 Answers0