The cursor.skip() method is often expensive because it requires the server to walk from the
beginning of the collection or index to get the offset or skip position before beginning to return
results. As the offset (e.g. pageNumber above) increases, cursor.skip() will become slower and
more CPU intensive. With larger collections, cursor.skip() may become IO bound.
/** * Limits the number of elements returned in one batch. A cursor
* typically fetches a batch of result objects and store them
* locally.
*
* If {@code batchSize} is positive, it represents the> * performance and limit data transfer.
*
* If {@code batchSize} is negative, it will limit of number objects returned, that fit within the max batch> * 4MB), and cursor will be closed. For example if {@code batchSize} is -10, then the server will return a maximum of 10 documents and
* as many as can fit in 4MB, then close the cursor. Note that this feature is different from limit() in that documents must fit within