I am running a batch job that selects a batch of 100 documents, and then grabs all of the documents linked to it – possibly upto 25 for each.
I do the “join” using the ids from the first batch. So potentially I am calling session.load with 25 * 100 ids. I tried to implement paging, but it does not look possible using the load method which returns an array.
What is the best practice here?
Best practice is to use the .Include method rather than do what you are describing. You can read more in the documentation.
If you want to post some code of what you are doing now, I can provide a more detailed response.