0 points

Build indexes on MongoDB


dashboard

Wed Aug 19 2020 06:27:09 GMT+0000 (UTC)

Posted by @salitha.pathi #mongoshell

db.getCollection('AccountSummary').createIndex({txDate: NumberInt(1)});
db.getCollection('AccountSummary').createIndex({jobId:NumberInt(1)});
db.getCollection('AccountSummary').createIndex({userId:NumberInt(1)});
db.getCollection('AccountSummary').createIndex({isActive:NumberInt(1)});
content_copy Copy

https://docs.mongodb.com/manual/tutorial/manage-indexes/