I need to get a large DBCollection to the memory. Since DBCollection.find()
is not working, I used DBCollection.parallelScan()
to achieve this. But in parallelScan I can't specify a query condition like in DBCollection.find(query)
.
Is it possible to use query BasicDBObject
in parallelScan
?
find()
will batch the query results. By default, the batch size is 20 documents so it's pretty unlikely that find()
is the culprit. You're likely holding on to too much data in your application.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.