Assuming that there is no index, is there a significant performance difference between sorting based on just one field vs multiple fields?
db.movies.aggregate([
{ $sort: { likes: -1 } }
{ $limit: 100 }
])
vs
db.movies.aggregate([
{ $sort: { likes: -1,
views: -1,
comments: -1,
bookmarked: -1 ,
dislikes: 1
}
},
{ $limit: 100 }
])
If I am building an APP, will the second query scale? Would there be a significant increase in time cost