That should be better for exactly the reason you state. Be sure to drop any sorts which are part of your query.
Submit the request for exists on JIRA. Seems useful to me. In some cases it could be slightly faster by not returning results (eg if the document that matched first was big - which is the one downside I see to your approach but it strikes me as overall better than a count).
-- Max
--
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
See also the IRC channel -- freenode.net#mongodb