Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
419 views
in Technique[技术] by (71.8m points)

mongodb聚合怎么查看查询性能?

用find可以使用explain('executionStats')查看查询分析,但是aggregate用没有explain查询分析了,根本看不出它有没有用索引,是否在内存排序这些问题啊...


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

不妨多看看官方文档吧。

https://docs.mongodb.com/manu...

db.collection.aggregate(pipeline, options)

The options document can contain the following fields and values:explain,allowDiskUse,etc.

Love MongoDB! Have Fun!


MongoDB在线讲座系列19- MongoDB 10步构建单一视图

就在4月19日,请戳:>---<


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...