Fastest way to duplicate mongodb collection

db.myoriginal.aggregate([ { $out: "myCopy" } ])


db.runCommand({
aggregate: "myOriginal",
pipeline: [{ $match: {} }, { $out: "myCopy" }]
});
 
posted @ 2018-10-30 16:20  天藐水瓶  阅读(284)  评论(0编辑  收藏  举报