Why can't I run explain on MongoDB update?

后端 未结 2 796
一个人的身影
一个人的身影 2021-01-11 20:40

I\'m trying to explain a mongoDB update; but nothing is happening? Does Mongo not support this?

> db.movies.update({\"actors.name\": \"Christian Bale\"},          


        
2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-11 21:22

    I believe the following will allow you to call explain on your query.

        db.movies.explain().update({your_query})
    

    Hope this helps, if you need more info let me know.

提交回复
热议问题