title: How Spring batch JdbcCursorItemReader read data from database?
body: <p>I am using Spring batch, and reading data from <code>postgreSQL</code> using <code>JdbcCursorItemReader</code>. My concern is how internally <code>JdbcCursorItemReader</code> reads database records?
  For example, if there are 1000k records in database, and chunk size is 1000. So in this case <code>JdbcCursorItemReader</code> will try to fetch all 1000k records in JVM and then start execution of 1000 size chunk, or it will fetch only 1000 records from database at a time(or some other way to fetch records).
  Also what is the use of <code>setFetchSize</code>, and how it is different from mentioning chunk size? 
  My requirement is to stream data from <code>postgreSQL</code> db to jvm. What configurations do I need for this?</p>