Indexes in MongoDB speed up queries by letting the database find documents without scanning the whole collection — just like in relational databases. Without indexes, queries do a collection scan (checking every document); with them, lookups are fast. MongoDB supports several index types.
Creating and using indexes
db..({ : });
db..({ : });
db..({ : });
db..();
