[SERVER-8776] Querying on $keyname is possible and leads to collection scans Created: 28/Feb/13 Updated: 18/Aug/14 Resolved: 18/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andre de Frere | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Participants: | |||||
| Description |
|
A query can be created to scan for a non existent key that starts with a $. These fields are not permitted to be inserted, but can still be queried on. This leads to a collection scan, which can have many performance impacts. If the $ character denotes an operator (like $inc, $date etc) then when some unknown operator is found, it should be rejected by the query rather than cause a collection scan. In this way queries like
would fail. |
| Comments |
| Comment by Thomas Rueckstiess [ 18/Aug/14 ] | |||||
|
This is fixed in 2.6:
|