show collections
db.getCollectionNames()
db.runCommand( { listCollections: 1.0, authorizedCollections: true, nameOnly: true } ) 와 동일권한에 따라 system db 제외하기
db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) print(db[c])})db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) {print (db[c]); print(db[c].countDocuments())}})getIndexes() : index 조회
db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) {print (db[c]); print(db[c].getIndexes())}})totalIndexSize(): index size 조회
db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) {print (db[c]); print(db[c].totalIndexSize())}})stats() : 통계 정보 조회
db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) {print (db[c]); print(db[c].stats())}})totalIndexSize() : index 가 차지하는 bytes
storageSize() : document storage 가 차지하는 bytes
db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) {print (db[c]); print(db[c].storageSize())}})totalSize() : index, data 합쳐서 전체 bytes
db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) db[c].drop()})