[SERVER-27235] Improve performance of QueryPlannerIXSelect::getFields() Created: 30/Nov/16 Updated: 05/Apr/17 Resolved: 20/Dec/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | James Wahlin | Assignee: | James Wahlin |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Participants: | |||||
| Linked BF Score: | 0 | ||||
| Description |
|
QueryPlannerIXSelect::getFields() performs expensive string creation and concatenation operations. This can be avoided for queries that don't involve $elemMatch as the string returned is the same as stored in the MatchExpression. Identified as a hotspot by running the Queries.RegexPrefixFindOne mongo-perf test (in read command mode) under VTune. |
| Comments |
| Comment by James Wahlin [ 20/Dec/16 ] |
|
Work to reduce getFields() CPU consumption has had a negligible impact on the micro-benchmarks we were targeting and appears to cause a small loss of performance for others. Given this was not one of the more significant hotspots found we are closing and will focus efforts elsewhere. |