Fastest way to duplicate mongodb collection
文章目录
db.myoriginal.aggregate([ { $out: "myCopy" } ])
db.runCommand({
aggregate: "myOriginal",
pipeline: [{ $match: {} }, { $out: "myCopy" }]
});
db.myoriginal.aggregate([ { $out: "myCopy" } ])
db.runCommand({
aggregate: "myOriginal",
pipeline: [{ $match: {} }, { $out: "myCopy" }]
});
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论