Skip to content

Instantly share code, notes, and snippets.

@AlexMihov
Created July 6, 2017 12:45
Show Gist options
  • Save AlexMihov/f47c9eafadd43c3118af14a34eaf36c6 to your computer and use it in GitHub Desktop.
Save AlexMihov/f47c9eafadd43c3118af14a34eaf36c6 to your computer and use it in GitHub Desktop.
Show Stats
var collections = db.getCollectionNames();
for(var i = 0; i < collections.length; i++){
var name = collections[i];
if(name.substr(0, 6) != 'system'){
var c = db.getCollection(name).count() ;
if (c > 1000) print(name + ' - ' + c + ' records');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment