Um… Is that a manual explanation?
What I was curious about was this.
I did this command
db.collecion.find( { field0 : { $gt : 10000 } } ).sort( { field1 : 1 } )
I’ve used this in three cases.
i) no index
ii) { field1 : 1}
iii) {field1 : 1, field0 : 1 }
The results of each action were like this.
i) executionTimeMillis : 4541,
sort - sort_key_generator - collscan
ii) executionTimeMillis : 35878
fetch - ixscan
iii) executionTimeMillis : 38614
fetch - ixscan
You can see no index took longer.
My question was this.
How does Index affect the Sort to show this result?