Compact Command in MongoDB 2.0
MongoDB v2.0 includes a new command that compacts and defragments a given collection.
Compaction can be important for performance if a collection is large and has had many delete or update operations. Over time these operations create fragmentation in the collection's storage.
During the compaction, all indexes are rebuilt in
parallel. The rebuilt indexes are in the new and more efficient {v:1} index format.
Compacting is a blocking operation -- other
database requests cannot be processed while it is underway. Because of this, the command will not by default run on a replica set primary. When invoked on a replica set secondary, the member will automatically demote itself to a "recovery" state until the
compaction is complete.
One important thing to keep in mind is that when fully compacted there is no Padding Factor for existing documents. Updates
that grow documents are slower when a record has no padding (over time the system adapts to this, but that adaption takes time).
MMS Docs Available
MongoDB Monitoring Service (MMS) is a
SaaS based tool that monitors your MongoDB clusters and makes it easy for you to see what’s going on in a production deployment.
Documentation for MMS is now available at mms.10gen.com/help, covering installation of the MMS agent and operation of the MMS console.
You can find answers to common questions in the docs, but for all other inquiries please feel free to open a JIRA ticket or post to the MMS support forum.
MMS Overview | Docs | Register
Now
MongoDB in Action now available
MongoDB in
Action by Kyle Banker is available in print this month.
MongoDB in Action is a comprehensive guide to MongoDB for application developers. The book begins by explaining what makes MongoDB unique and describing its ideal use cases. Tutorials and detailed examples specific to e-commerce, social networking,
analytics, and other common applications are also included in the book.
Coming to MongoSV? Author Kyle Banker will be on hand to sign copies, in addition to presenting two MongoSV sessions (“Schema Design by Example” and “How
to build a MongoDB driver”).
MongoDB Community Events
![119_119_5132_AH_119]()
Full Listing at mongodb.org/events
Not your area? Update your profile so we can send you news about MongoDB events in your
area.
MongoDB Internships
10gen interns have the opportunity to contribute to open source software and work directly with the
MongoDB community.
Interested in being part of the team in the summer of 2012? We are interviewing interns over the next two months for positions in the San Francisco Bay Area and New York City, so apply for 2012 Engineering Internships today.
24/7 Commercial Support
Commercial support for MongoDB is available from 10gen. 10gen develops and supports MongoDB.
|