adspace


How to know, what indexes exist in a collection?

Answer Posted / Sunny Rana

{"indexes": "To view the existing indexes on a MongoDB collection, you can run the command `db.<collectionName>.getIndexes()` or use the `ds.collectionAggragate` method with the `$indexStats` pipeline stage."]}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How did mongodb get its name?

60


How to define array in mongoose schema?

79


what is the command syntax for inserting a document?

63