Hi Team,
Can you please clarify the below 2 mongo commands. during executing different output
- command :
db.getCollection(‘june_2022_test’).find({"$and": [{“timeStamp”: {"$gt": ISODate(“2022-06-23T05:53:00.000”)}},{“timeStamp”: {"$lt": ISODate(“2022-07-09T04:47:00.000”)}},{ “publisher” : “N”}]}).count()
0
- Command :
db.getCollection(‘june_2022_test’).find({“publisher”:“N”}).count()
the 2nd command execute is long time
why the different 1st and 2nd command what is reason