[SERVER-19552] Reduce unnecessary "properties" computation in QuerySolutionNode Created: 23/Jul/15  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: J Rassi Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Participants:

 Description   

In simple read path benchmarks with perf of an indexed query of shape {key: value}, I observed that ~10% of query planning CPU time was spent in IndexScanNode::computeProperties(). This method computes the sort orders offered by the index associated with the given query solution node (and is run even when the given user query has no requested sort), and is expensive as currently implemented.

The method QuerySolutionNode::computeProperties() should be removed, and all public members in derived classes should be made private. It should then be left up to implementations whether or not to lazily generate computed properties from their accessors.

Before work is started on this ticket, the above measurement should be verified (re-run the above benchmark, compare against a fork where the body of computeProperties() is deleted).


Generated at Thu Feb 08 03:51:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.