How to know, what indexes exist in a collection?



How to know, what indexes exist in a collection?..

Answer / 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

More MongoDB Interview Questions

What are 32-bit nuances?

1 Answers  


Where mongodb data is stored?

1 Answers  


Can the old files in the ‘movechunk’ directory be removed?

1 Answers  


What do you understand by nosql databases? Is mongodb a nosql database? Explain.

1 Answers  


How does mongodb replication work?

1 Answers  


What is a covered query in mongodb?

1 Answers  


What is the difference between mongodb and redis database?

1 Answers  


Is mongodb support null values?

1 Answers  


Does mongodb run on amazon ebs?

1 Answers  


Does mongodb support foreign key constraints?

1 Answers  


What do you understand by nosql databases?

1 Answers  


What is schema in mongoose?

1 Answers  


Categories