Mongos> db. find ({"user": "jhon"}). sort ({"name ": 1}). limit (100). explain () { "Cursor": "BtreeCursor user_1 ", "Nscanned": 10100, "NscannedObjects": 10100, "N": 100, "ScanAndOrder": true, "Millennium": 116, "NYields": 0, "NChunkSkips": 0, "IsMultiKey": false, "IndexOnly": false, "IndexBounds ":{ "User ":[ [ "Jhon ", "Jhon" ] ] } } Second, I do $ or query with sort (): Mongos> db. find ({"$ or": [{"user": "jhon" },{ "owner ": "Jhon"}]}). sort ({"name": 1}). limit (100). explain () { "Cursor": "BtreeCursor name_1 ", "Nscanned": 1010090, "NscannedObjects": 1010090, "N": 100, "Millennium": 3800, "NYields": 0, "NChunkSkips": 0, "IsMultiKey": false, "IndexOnly": false, "IndexBounds ":{ "Name ":[ [ { "$ MinElement": 1 }, { "$ MaxElement": 1 } ] ] } } Last, I do $ or query without sort (): Mongos> db. find ({"$ or": [{"user": "jhon" },{ "owner ": "Jhon"}]}). limit (100). explain () { "Cursor": "BtreeCursor user_1 ", "Nscanned": 100, "NscannedObjects": 100, "N": 100, "Millis": 0, "NYields": 0, "NChunkSkips": 0, "IsMultiKey": false, "IndexOnly": false, "IndexBounds ":{ "User ":[ [ "Jhon ", "Jhon" ] ] } } |