MongoDB Documentation, Release 3.0.4 Can support queries that the following indexes support: There are some situations where the prefix indexes may offer better query performance: for example if z is a large array. The { x: 1, y: 1, z: 1 } index can also support many of the same queries as the following index: Also, { x: 1, z: 1 } has an additional use. Given the following query: The { x: 1, z: 1 } index supports both the query and the sort operation, while the { x: 1, y: 1, z: 1 } index only supports the query. For more information on sorting, see Use Indexes to Sort Query Results (page 548). Starting in version 2.6, MongoDB can use index intersection (page 510) to fulfill queries. The choice between creating compound indexes that support your queries or relying on index intersection depends on the specifics of your system. See Index Intersection and Compound Indexes (page 510) for more details. In MongoDB, sort operations can obtain the sort order by retrieving documents based on the ordering in an index. If the query planner cannot obtain the sort order from an index, it will sort the results in memory. Sort operations that use an index often have better performance than those that do not use an index. In addition, sort operations that do not use an index will abort when they use 32 megabytes of memory. If an ascending or a descending index is on a single field, the sort operation on the field can be in either direction. For example, create an ascending index on the field a for a collection records : This index can support an ascending sort on a : The index can also support the following descending sort on a by traversing the index in reverse order: Create a compound index (page 489) to support sorting on multiple fields. You can specify a sort on all the keys of the index or on a subset; however, the sort keys must be listed in the same order as they appear in the index. For example, an index key pattern { a: 1, b: 1 } can support a sort on { a: 1, b: 1 } but not on { b: 1, a: 1 } . Chapter 8. Indexes 548 Sort on Multiple Fields Sort with a Single Field Index Use Indexes to Sort Query Results { x: 1, y: 1, z: 1 } { x: 1 } { x: 1, y: 1 } { x: 1, z: 1 } db.collection.find( { x: 5 } ).sort( { z: 1} ) db.records.createIndex( { a: 1 } ) db.records.find().sort( { a: 1 } ) db.records.find().sort( { a: -1 } )