[SERVER-72899] Invalid cardinality estimate Created: 17/Jan/23  Updated: 29/Oct/23  Resolved: 19/Jan/23

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

Type: Bug Priority: Major - P3
Reporter: Milena Ivanova Assignee: Alya Berciu
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-73033 Improve sparse histogram bucket equal... Backlog
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: QO 2023-01-23
Participants:

 Description   

The query

{$match: {"chi2_int_10000000_1000" :

{ "$gt" : 4017000, "$lt" : 4018000}

}} 

over ce_data_100000 collection from CE accuracy tests fails with invalid cardinality estimate.

To reproduce:

0) Run data generator 

1) Load CE accuracy data executing the commands from jstests/query_golden/load_data.js

2) Run the query

 

load("jstests/libs/ce_stats_utils.js");                                                            
load("jstests/libs/optimizer_utils.js");
load("jstests/query_golden/libs/run_queries_ce.js");
 
let collMeta = dbMetadata[3]; // check the collection is ce_data_100000
let collName = collMeta.collectionName;                                                         
let coll = testDB[collName];
let testCase =  {_id: 0, pipeline: [{$match: {"chi2_int_10000000_1000" : { "$gt" : 4017000, "$lt" : 4018000}
}}], "dtype": "int", "qtype" : "$gt"};
let strategy = "histogram";                                                                                                                                              
forceCE(strategy);                                                                                                                                                                     runAggregationWithCE(coll, testCase, strategy);

 



 Comments   
Comment by Githook User [ 19/Jan/23 ]

Author:

{'name': 'Alya Berciu', 'email': 'alya.berciu@mongodb.com', 'username': 'alyacb'}

Message: SERVER-72899 Clamp range CE to a minimum of 0
Branch: master
https://github.com/mongodb/mongo/commit/0c20bd788610ed8d63999eca371c6558172d4aeb

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