Mongodb – collection partitioning in mongodb

mongodb

Is there any semantic like table partitioning in MongoDB? My data is not that much that it would need sharding. but data is not important(but not completely useless) after several months.

Best Answer

If you mean is there an archival type option built into MongoDB, the answer is: not yet.

You can take the manual approach, mongodump the data out, store it elsewhere and then delete it from your current data set for example. Or move the data to a different collection and ensure that the collection is as compact as possible (by running a repair for example).

At the moment though there is nothing to do this kind of operation automatically.