I’m working with a database MongoDB and due to the high consumption of resources (work with a dataset of almost 100GB), I need to shrink the field names of documents (something like “ALTER TABLE”).
Is there an easy / automatic to do this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think so! Check out
$rename: http://www.mongodb.org/display/DOCS/Updating#Updating-%24renameRun an
update()on your data set with a query with a bunch of$renames and I think that will get you what you want.