Calling the hasNext method of the MongoBatchCursorAdapter class takes a long time to execute with 10,000 records

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 4.9.0
    • Component/s: None
    • None
    • None
    • Java Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      When I was adjusting the query efficiency, I found that calling the hasNext method of the MongoBatchCursorAdapter class took a long time to execute for 10,000 records. Can it be optimized? Or am I using the wrong method? What is the correct method? The picture below is the method I used.

        1. image-2024-07-28-16-44-43-945.png
          249 kB
          wen an
        2. image-2024-07-28-16-52-03-138.png
          323 kB
          wen an
        3. screenshot-1.png
          280 kB
          wen an

            Assignee:
            Ross Lawley
            Reporter:
            wen an
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: