I need to count all the collections in the data. Which collection contains the most data? How to deal with it.
The mongoose I see uses model to process the corresponding collection. There is a large amount of data that has been imported into the database. How do I get the collection?
Get the list of collections:
1. Use node-mongodb-native driven listCollections
http://mongodb.github.io/node...
2. The connection in Mongoose also inherits the above native driver:
https://github.com/Automattic...
mongoose.connection.db.listCollections()
Contains the largest Collection:
You need to count and sort by yourself
For reference.
Love MongoDB! Have fun!
show tables