Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    Cross-posted from StackOverflow: stackoverflow.com/questions/53398638/…. The first comment there (from 9 hours ago) identifies an obvious issue: "nscannedObjects" : 2209900 means that your update needed to read over 2M docs to find the documents to update. Add an index to efficiently support your update query. Commented Nov 21, 2018 at 6:29
  • Add it as an answer. Commented Nov 21, 2018 at 11:33
  • That was one off query. Have got rid of those queries now. However, now I come to other slowest queries with the help of db profiler. What I found is time to acquire lock is 2497196 micros. (2497 millis).How can I reduce the time required to acquire a lock? Commented Nov 22, 2018 at 6:52