Auto Archiving for capped collection

748 views
Skip to first unread message

Inkvizitor

unread,
Apr 1, 2010, 9:10:44 AM4/1/10
to mongodb-user
Auto Archiving. If you know you want data to automatically "roll out"
over time as it ages, a capped collection can be an easier way to
support than writing manual archival cron scripts.

Please, explain, how to realize this feature.


Eliot Horowitz

unread,
Apr 1, 2010, 9:48:37 AM4/1/10
to mongod...@googlegroups.com
Do you mean how to use capped collections?
See: http://www.mongodb.org/display/DOCS/Capped+Collections

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Inkvizitor

unread,
Apr 1, 2010, 10:03:44 AM4/1/10
to mongodb-user
Yes. I want to archive old data. For instance, size of capped
collection reaches limit and new records will replace the oldest. I
want to archive the oldest records before replacing.

Eliot Horowitz

unread,
Apr 1, 2010, 10:06:02 AM4/1/10
to mongod...@googlegroups.com
There isn't a way to do that.
But doesn't that kind of defeat the purpose?
Why not just have 1 collection if you want to archive forever anyway?

Inkvizitor

unread,
Apr 1, 2010, 10:25:16 AM4/1/10
to mongodb-user
Most of all queries will touch recent data of huge collection. I am
worrying about performance in that case.

What limit of usual collection do i get?

Michael Dirolf

unread,
Apr 1, 2010, 10:56:30 AM4/1/10
to mongod...@googlegroups.com
The OS will handle LRUing out data, so if all of your queries are
touching the same portion of data that should stay in memory
independently of the total size of the collection.
Reply all
Reply to author
Forward
0 new messages