> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> 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.
>
count() is a separate server operation and not related to the curser
iterator state.
This is the correct usage:
DBCursor cursor = collection.find().skip(10);
count() works because it is a separate operation and has nothing to do
with the query running or the cursor state.
Both of those run queries/operations on the server and not the same one. Which means more load and more round trps on the server.
It might make more sense if you look at how count works in dbcusor.
You could ask for a feature where skip() simply eats/ignores some number of the documents in memory on the client but that gets confusing to describe wrt performance.