Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-72899

Invalid cardinality estimate

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • QO 2023-01-23

      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);
      

       

            Assignee:
            alya.berciu@mongodb.com Alya Berciu
            Reporter:
            milena.ivanova@mongodb.com Milena Ivanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: