mongodb查找size大于1的内嵌list的document
发布时间:2023-10-18 15:33:50 所属栏目:系统 来源:
导读:db.user_profile.find({ $where: "this.disk_rack.length > 1" } )
但是这种js引擎执行的会非常慢
更好的办法是
CreateextrafieldNamesArrayLength, update it with names array length and then use in
但是这种js引擎执行的会非常慢
更好的办法是
CreateextrafieldNamesArrayLength, update it with names array length and then use in
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). (编辑:聊城站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐