【发布时间】:2020-04-26 05:20:18
【问题描述】:
我很好奇在使用 mongoose 执行 updateMany 命令时应该在 where 查询中指定什么。
例如给定这个更新操作:{ $pull: { tags: { $in: ["tagone", "tagtwo"] } } }
where 查询应该是:
{organisation: "fffffff..."} 或 {organisation: "fffffff...", tags: {$in: ["tagone", "tagtwo"]}
where 查询中的额外特异性会提高还是降低性能,还是没有区别?
(没有应用数据库索引)
【问题讨论】:
标签: mongodb mongoose query-performance