Chunk Size Vs Page Size
- Chunk Size: how many items to process before moving to the
next()
- For example if chunk size is
3
:- we do read for 3 items, and then write for 3 items, and then read for 3 items, ...
- For example if chunk size is
- Page size: how many items to to read (in JPA or something) in the current reader process
Example
If page size < chunk size: for example, pagesize = 5, and chunk size is 20, we have the following:
- Read (5)
- Read (5)
- Read (5)
- Read (5)
- Write (20)
If chunk size < page size: for example, pagesize = 20, chunk size = 5 we have the following:
- Read (20)
- Write (5)
- Write (5)
- Write (5)
- Write (5)
If chunk size == page size: for example, page size = 3, chunk size = 3 we have the following:
- Read (3)
- Write (3)
- Read (3)
- Write (3)