This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use taskcenter | |
| var collections = db.getCollectionNames() | |
| collections.forEach((tableName)=>{ | |
| if(tableName !=="system.profile"){ | |
| print(`db.${tableName}.dropIndexes()`); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var db = connect(url); | |
| var dbName = db.getName(); | |
| print(`Database: ${dbName}`); | |
| var collections = db.getCollectionNames() | |
| collections.forEach((table)=>{ | |
| var commands = []; | |
| var indexes = db[table].getIndexes(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var db = connect(url); | |
| var collections = db.getCollectionNames(); | |
| collections.forEach((table)=>{ | |
| var commands = []; | |
| var indexes = db[table].getIndexes(); | |
| if(indexes.length>0){ |
NewerOlder