[SERVER-59861] Investigate if/why scans over small string fields are faster than scans over integers Created: 09/Sep/21  Updated: 15/Sep/21  Resolved: 15/Sep/21

Status: Closed
Project: Core Server
Component/s: Query Execution
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Kyle Suarez Assignee: Bikash Chandra (Inactive)
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Sprint: QE 2021-10-04
Participants:

 Description   

timour.katchaounov has noticed that for a collection with fields {f_0, f_1, f_2, f_3, f_4}, a collection scan over all the documents is 1.5x - 2x faster when each field is a small string compared to when each field is an integer.

The goal of this ticket is to investigate this, and if it's confirmed to be a real performance difference, determine why the integer comparisons are slower. We should test both the classic engine and SBE to determine if the regression is engine-specific, or something more fundamental to the execution system.



 Comments   
Comment by Timour Katchaounov [ 15/Sep/21 ]

I am very sorry for the noise - after all, this turned out to be a mistake in my scripts that generated the test queries. The query in question has had the wrong constant in the comparison condition, which resulted in selecting fewer documents. This was of course faster than selecting all documents.

Comment by Timour Katchaounov [ 14/Sep/21 ]

kyle.suarez I am investigating this now - it may be the case that this is due to a mistake in my benchmark scripts. These numbers were too strange to make sense. Still not 100% sure, I am running a new version of my benchmark scripts.

Comment by Kyle Suarez [ 14/Sep/21 ]

timour.katchaounov, could you please share what scripts you used to run your test so that the QE engineer who picks this up can take those and make a repro?

Generated at Thu Feb 08 05:48:20 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.