MongoDB Documentation, Release 3.0.4 TTL Indexes 8.1.3 Index Use 8.1.4 Covered Queries 8.1.5 Index Intersection 8.1.6 Restrictions MongoDB can use the intersection of indexes (page 510) to fulfill queries. For queries that specify compound query conditions, if one index can fulfill a part of a query condition, and another index can fulfill another part of the query condition, then MongoDB can use the intersection of the two indexes to fulfill the query. Whether the use of a compound index or the use of an index intersection is more efficient depends on the particular query and the system. New in version 2.6. For details on index intersection, see Index Intersection (page 510). For more information on covered queries, see Covered Query (page 66). Certain restrictions apply to indexes, such as the length of the index keys or the number of indexes per collection. See Index Limitations for details. 485 8.1. Index Introduction When the query criteria and the projection of a query include only the indexed fields, MongoDB will return results directly from the index without scanning any documents or bringing documents into memory. These covered queries can be very efficient. Indexes can improve the efficiency of read operations. The Analyze Query Performance (page 111) tutorial provides an example of the execution statistics of a query with and without an index. For information on how MongoDB chooses an index to use, see query optimizer (page 68). TTL indexes (page 503) are special indexes that MongoDB can use to automatically remove documents from a collec- tion after a certain amount of time. This is ideal for certain types of information like machine generated event data, logs, and session information that only need to persist in a database for a finite amount of time. See: Expire Data from Collections by Setting TTL (page 211) for implementation instructions.