SORT with $limit larger than the cardinality should have the same cost as sort without a limit

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Enterprise test> db.foo.find().sort({a:1}).hint({$natural: 1}).limit(10000000000).explain('executionStats').executionStats.executionStages.costEstimate;
      17.516987879549447
      
      Enterprise test> db.foo.find().sort({a:1}).hint({$natural: 1}).explain('executionStats').executionStats.executionStages.costEstimate;
      32.13347149705384
      

              Assignee:
              Asher Kornfeld (Inactive)
              Reporter:
              Philip Stoev
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: