Best practices for using mongodb cursor

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Critical - P2
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Mongodb with nodejs driver
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When I do a find, we get a new cursor from mongo.

      I never close these cursors, i leave it to mongo to handle everything.
      But if I 'force close' the cursor after every find (since i never re-use it and i have thousands of finds per second), will that improve performance or it just doesn't matter ?

      Also is it worth implementing logic to re-use a cursor (because technically i do 'very similar queries' over an over again) ? Or getting a new cursor is extremely fast and not expensive at all ?

              Assignee:
              Unassigned
              Reporter:
              Kurt Agius
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: