Skip to content

Instantly share code, notes, and snippets.

@countless-integers
Created January 4, 2017 12:41
Show Gist options
  • Save countless-integers/570148db316cd0d93fc8aec872b19641 to your computer and use it in GitHub Desktop.
Save countless-integers/570148db316cd0d93fc8aec872b19641 to your computer and use it in GitHub Desktop.
Dummy collection count in mongodb
var collections = db.getCollectionNames();
collections.forEach(function (item) {
print(item + ": " + db[item].stats().count);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment