skip to Main Content

Mongodb – Mongoose POST method

I am building a MERN app where I want to use a POST method to send data to my collection in MONGODB. I imported schema as Messages here is the code app.post("/messages/new",(req,res) => { const dbMessage = req.body; Messages.create(dbMessage,(err,data) =>…

VIEW QUESTION

How to check mongoDB updateOne execution time

I have been using .explain("executionStats") to find the execution time for a get-call like below in mongoDB compass console sh: db.getCollection('Employee').find({"value.attendence":{$elemMatch:{"$lt":"2023-03-11T08:49:00Z","$gt":"2023-03-11T08:51:00Z"}}}).explain("executionStats") This works fine. However now I want to see the update timings and not finding a proper query. I…

VIEW QUESTION
Back To Top
Search