028-86922220

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

mongodb查询size大于1的内嵌list的document

db.user_profile.find({ $where: "this.disk_rack.length > 1" } )
但是这种js引擎执行的会非常慢

更好的办法是
CreateextrafieldNamesArrayLength, update it with names array length and then use in queries:
db.accommodations.find({"NamesArrayLength": {$gt: 1} });

It will be better solution, and will work much faster (you can create index on it).

网站名称:mongodb查询size大于1的内嵌list的document
分享链接:http://www.tsicrk.com/article/ijpppp.html

其他资讯

让你的专属顾问为你服务

0.8204s