> db.myoriginal.aggregate([{$out: "mycopy"}])
It is a lot faster than doing many inserts in a forEach
loop.
More Related Contents:
- Find document with array that contains a specific value
- Update field in exact element array in MongoDB
- How to change the type of a field?
- Mongodb sort inner array
- Return only matched sub-document elements within a nested array
- MongoDB wildcard in the key of a query
- How to create a DB for MongoDB container on start up?
- MongoDB field order and document position change after update
- MongoDB Full and Partial Text Search
- How to enable authentication on MongoDB through Docker?
- Mongodb Join on _id field from String to ObjectId
- Difference between count() and find().count() in MongoDB
- How do I do a “NOT IN” query in Mongo?
- How to efficiently perform “distinct” with multiple keys?
- Hierarchical queries with Mongo using $graphLookup
- Search on multiple collections in MongoDB
- Mongo, find through list of ids
- Image returned from REST API always displays broken
- Difference between “id” and “_id” fields in MongoDB
- MongoDB nested array query
- Filtering embedded documents in MongoDB
- Remove multiple documents from mongo in a single query
- Is mongodb running?
- Push to two separate arrays in one update call in mongodb
- How to toggle a boolean field in one document with atomic operation?
- How to delete documents by query efficiently in mongo?
- Sum in nested document MongoDB
- Update embedded object inside array inside array in MongoDB
- MongoDB on Ubuntu won’t start as a service, nothing in the log
- Mongodb concat int and string