We use morphia 0.99 and the java driver 2.7.3. I would like to know if there is a difference between fetching records one by one using fetch and getting asList results (suppose there is enough memory for asList to get records).
We iterate over a large collection, and when using fetch I sometimes encounter a cursor not found exception on the server during the fetch operation, so I need to run another command to continue, what could be the reason for this?
1-)fetch the record 2-)do some calculation on it 3-)+save it back to database again 4-)fetch another record and repeat the steps until there isn't any more records.
So which one will be faster? Getting records one by one or getting arrays of results using asList or is there no difference between them using morphine implementation?
thanks for answers
source share