What is the difference among MongoDB's aggregation $min versus query modifier $min versus find().sort() that returns the minimum of the_field with: db.the_collection.find().sort({the_field:1}).limit(1)
?
Which one should I use if there are about a few hundred calls per minute to retrieve the minimum element in a collection and work with it independently each time?
Side question: Can someone show me the correct syntax using either $min to give me the minimum of a field in a collection? db.the_collection.find().min({the_field:10})
doesn't work.