Skip to content

Index intersection and sort #2776

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: v3.2
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/core/index-intersection.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ MongoDB cannot use index intersection for the following query with sort:

db.orders.find( { qty: { $gt: 10 } } ).sort( { status: 1 } )

That is, MongoDB does not use the ``{ qty: 1 }`` index for the query,
Instead, MongoDB uses the ``{ qty: 1 }`` index for the query,
and the separate ``{ status: 1 }`` or the ``{ status: 1, ord_date: -1
}`` index for the sort.

Expand Down