MongoDB Indexes

The documentation says: If you have a composite index in several fields, you can use it to query at the beginning of a subset of fields. Therefore, if you have a pointer to a, b, c, you can use the request to a, b a, b, c

My question is: if I have a composite index, for example a, b, c, can I ask a, c and sort by c?

+3
source share
1 answer

It seems that this question was answered in Google Groups :

Ineffective, no. Take a look at the explanation () from the queries to see what happens.

+2
source

All Articles