Web-Development-MEAN-Development-softlabx
MEAN Development

What purpose do indexes serve in MongoDB

What purpose do indexes serve in MongoDB of mean stack?

Indexes utilised in MongoDB to support and expedite the effective execution of queries.

Without indexes, MongoDB must run a collection scan in

which it looks over each document in a collection and chooses the ones that best match the query.

However, MongoDB can use the index to reduce the number of documents it needs to inspect if each query given a suitable index.

Enquiry Now

Leave a Reply

Your email address will not be published.