[SERVER-30994] Allow queries containing $not to use non-btree indices Created: 07/Sep/17 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Nicholas Zolnierz | Assignee: | Backlog - Query Optimization |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Optimization
|
||||||||
| Participants: | |||||||||
| Description |
|
There is no obvious reason to disallow non-btree index usage with a $not expression. Several geo tests show that the planner is generating correct index bounds for queries containing $not and a geo index: https://github.com/mongodb/mongo/blob/master/src/mongo/db/query/query_planner_geo_test.cpp#L965 https://github.com/mongodb/mongo/blob/master/src/mongo/db/query/query_planner_geo_test.cpp#L1085 |
| Comments |
| Comment by Asya Kamsky [ 08/Sep/17 ] |
|
Does the sparseness of the index affect correctness in some of these cases? |