--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To view this discussion on the web visit https://groups.google.com/d/msg/mongodb-user/-/eSUHSF7uITsJ.
To post to this group, send email to mongod...@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
Are you iterating over the entire collection?
It is possible that the cursor is reiterating over modified documents, one way to solve this is to get them in batches of _id ranges sorted by _id, this way no matter how much a document moves on disk it will not be read twice.
Also using ranges will allow you (in multithread langs) to speed everything up in general really.
On 13 March 2012 09:28, Daniel Hunt
I'm iterating over a cursor containing a few tens of millions of documents.
What's your query plan look like? If you don't want to iterate over the updated data again, you need to add a criteria which will not include it in the query again. For example, you could update the modified timestamp in your object and make your query to limit to anything updated before current timestamp.
From: Daniel Hunt
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
It'd be helpful to see the exact syntax of your queries here. Are you using "find" and then doing an update? Or are you doing a multi-update via a single "update" command?