[SERVER-22857] eliminate redundant conditions/clauses from query Created: 25/Feb/16 Updated: 19/Dec/23 Resolved: 19/Dec/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Backlog - Query Optimization |
| Resolution: | Duplicate | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
When query format is something like
In both cases one of the query parts is 100% redundant of the rest. This is to track optimizing it out of query consideration/evaluation. |
| Comments |
| Comment by Asya Kamsky [ 10/Jul/20 ] | ||
|
A couple of examples that came up that should probably be handled under this work:
In fact, $exists clause is redundant alongside many/most other clauses on the same field, except null equality(there may be another one or two). Note that we don't have this problematic behavior if it is a type check along with value comparison that already requires that type, I believe we fixed that when implementing partial index filters. Closely related ticket is | ||
| Comment by NOVALUE Mitar [ 06/Apr/16 ] | ||
|
This is important also because redundant clauses can throw unnecessary errors because they look like query might be ambiguous, see SERVER-18500. |