Limiting results in MongoDB but still getting the full count?

后端 未结 5 493
不思量自难忘°
不思量自难忘° 2020-12-03 09:38

For speed, I\'d like to limit a query to 10 results

db.collection.find( ... ).limit(10)

However, I\'d also like to know the total count, so

5条回答
提交回复
热议问题