I have a string field in a mongodb collection which holds values in comma separated string. Now i want change the type of that particular field to array. As the collection contains 30 million records, would the below query have any performance implications?
db.getCollection("collectionName").find().forEach( function (el) {
el.NameofFieldToChangeType = el.NameofFieldToChangeType.split(',');
db.databaseName.save(el);
});