[SERVER-14206] Use index is order dependent Created: 09/Jun/14  Updated: 10/Dec/14  Resolved: 09/Jun/14

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: 2.6.1
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Michael Yang Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-14207 Use index is order dependent Closed
Operating System: ALL
Participants:

 Description   

mongodb (2.6.1) use index is order dependent.

in mongodb (2.4.10):
indexes: (a_1), (a_1, b_1)

db.test.find(

{a: 1, b: 1}

).explain() -->
indexBounds: (a_1, b_1)

but in mongodb (2.6.1):
indexes: (a_1), (a_1, b_1)

db.test.find(

{a: 1, b: 1}

).explain() -->
indexBounds: (a_1)

if I build index in reverse order:
indexes: (a_1, b_1), (a_1)

db.test.find(

{a: 1, b: 1}

).explain() -->
indexBounds: (a_1, b_1)


Generated at Thu Feb 08 03:34:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.