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.hxwzsj.com/article/ijpppp.html

其他资讯

Copyright © 2025 青羊区翔捷宏鑫字牌设计制作工作室(个体工商户) All Rights Reserved 蜀ICP备2025123194号-14
友情链接: 品牌网站建设 四川成都网站制作 高端网站建设 网站设计制作报价 成都网站设计 响应式网站设计方案 成都企业网站建设 网站建设方案 网站建设 成都网站设计 营销型网站建设 营销网站建设 成都网站制作 手机网站制作 成都网站建设 成都网站建设公司 成都网站建设 成都网站建设 响应式网站设计 移动网站建设 成都网站建设公司 成都网站建设