[SERVER-1215] speculatively evaluate multiple query plans for each $or clause (even after 101 matches found for query) Created: 10/Jun/10 Updated: 28/Jan/15 Resolved: 28/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Aaron Staple | Assignee: | David Storch |
| Resolution: | Duplicate | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| Description |
|
For non $or queries, the query optimizer attempts to speculatively evaluate a query using multiple indexes in parallel, until 101 matches are found with a single index. For $or queries, each $or clause can potentially speculatively evaluate multiple indexes. However, after 101 total matches are found speculative evaluation is stopped and an index is chosen arbitrarily for each $or clause. This ticket represents allowing speculative index evaluation in $or clauses even after the first 101 matches are found. |
| Comments |
| Comment by David Storch [ 28/Jan/15 ] |
|
I believe this has been fixed with the introduction of the Subplanner, a query execution stage responsible for selecting the best query plan for each clause of a rooted $or query. The Subplanner was introduced for version 2.6.0 under |