Will I get different results based on the order of FindOptions chained to my find() query?
I.e. will db.alphabet.find().limit(2).order({letter: 1}) return something else than db.alphabet.find().order({letter: 1}) .limit(2) (assuming I created documents in a random, unordered fashion)?
I’m currently watching a tutorial, and it looked like it might matter. Unfortunately, the docs I linked above don’t say (or I missed it)…
The order in which limit and sort are set on the query cursor doesn’t affect how the query is executed. MongoDB will always run sort first and then limit.
Considering the situation where the limit is executed first, it’s not very useful because it’s impossible to know what you are limiting.