[SERVER-67264] Avoid COLUMN_SCAN if dependencies prefix each other as in "a" and "a.b" Created: 14/Jun/22  Updated: 29/Oct/23  Resolved: 16/Aug/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Charlie Swanson Assignee: Charlie Swanson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-66418 Bad projection created during depende... Closed
Duplicate
is duplicated by SERVER-68570 Complete TODO listed in SERVER-62985 Closed
Problem/Incident
Related
is related to SERVER-67742 Fix column scan stage to accommodate ... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QE 2022-07-25, QE 2022-08-08, QE 2022-08-22
Participants:
Linked BF Score: 35

 Description   

There's currently a dassert that fails if this scenario arises. I think that parent/child dependencies (or more generally 'ancestral' dependencies like "a" and "a.b.c") should probably disqualify a COLUMN_SCAN since we will need to go to the row store probably to re-assemble the parent. This may not be the case in all cases, but should be a fairly good heuristic for the time being. For example I could imagine querying for {a.nested: {$exists: false}} and somehow knowing that means that in all matching results a will be a scalar value.

I think fixing it to work in this case would not be too bad, but it's probably not something that would be beneficial most of the time.



 Comments   
Comment by Githook User [ 16/Aug/22 ]

Author:

{'name': 'Charlie Swanson', 'email': 'charlie.swanson@mongodb.com', 'username': 'cswanson310'}

Message: SERVER-67264 Avoid COLUMN_SCAN if query needs overlapping fields
Branch: master
https://github.com/mongodb/mongo/commit/39e4b0c6ac51e8127c2afdaf7cc39742df6df5e1

Comment by Charlie Swanson [ 16/Jun/22 ]

Going to mark this as "depends on" SERVER-66418 and delay getting started on it in hopes of sharing some code/strategy from that patch.

Generated at Thu Feb 08 06:07:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.