In MongoDB, indexes are used to support and facilitate the efficient execution of queries. Without indexes, MongoDB has to perform a collection scan wherein it has to scan every document in a collection and select the appropriate documents that match the query statement. However, if each query has an appropriate index assigned to it, MongoDB can use the index to limit the number of documents it has to inspect.