r,w differnt from time taken by the query

14 views
Skip to first unread message

Suresh P

unread,
Sep 2, 2015, 3:24:59 AM9/2/15
to mongodb-user

query: {} update: {} nscanned:0 nscannedObjects:0 nMatched:1 nModified:0 upsert:1 keyUpdates:0 numYields:0 locks(micros) w:5707732 2856ms"

In the above log the w and time taken must have been equals right, may i know why are they different. I though that a query will hold a lock only as long as the query is running.

But in the above case query finished running in 2.8 seconds but the write lock was held for 5.7 seconds. Please explain.

Thanks
Suresh P

Asya Kamsky

unread,
Sep 2, 2015, 11:37:01 PM9/2/15
to mongod...@googlegroups.com
There were two write locks that may have been held.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/d1e75366-a5f5-41ab-99a4-656b7b9c2da9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages