[SERVER-80734] [CQF] Only sample indexed fields Created: 05/Sep/23  Updated: 03/Nov/23  Resolved: 03/Nov/23

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

Type: Improvement Priority: Major - P3
Reporter: Svilen Mihaylov (Inactive) Assignee: Chi-I Huang
Resolution: Fixed Votes: 0
Labels: M1
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-81345 [CQF] Create a structure to keep trac... Closed
Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Participants:

 Description   

Pass appropriate structure to the sampling estimator that contains the set of indexed fields. For a given sargable predicate, check if their field is an indexed field and if so sample, otherwise estimate heuristically.



 Comments   
Comment by Githook User [ 03/Nov/23 ]

Author:

{'name': 'Chi-I Huang', 'email': 'chii.huang@mongodb.com', 'username': 'chiihuang'}

Message: SERVER-80734 Sample only if all the field paths of a SargableNode are indexed

Sample only if all the field paths of a SargableNode are indexed. Otherwise, falls back to '_fallbackCE' to derive cardinality estimation. Note that:
1. If a query path is 'Get "a" Id' while an index path is 'Get "a" Traverse 1 Id', the query path will be deemed as unindexed and hence we will fall back.
2. Fix underestimated CE if there is residualReq
Branch: master
https://github.com/mongodb/mongo/commit/bac34dd6e0504d91950ceaf801b97450910dca0d

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