13. MongoDB
„Capped collections are fixed sized collections that have a very high
performance auto-FIFO age-out feature (age out is based on insertion
order). They are a bit like the "RRD" concept if you are familiar with that.”
„In addition, capped collections automatically, with high performance, maintain
insertion order for the documents in the collection; this is very powerful for
certain use cases such as logging.”
> db.createCollection("mycoll", {capped:true, size:100000})
> db.createCollection("messages", {capped: true, size:10000000,
autoIndexId:true})
15. MongoDB
Puchnące mongo ?
17772 root 15 0 1463m 474m 276m S 0.0 8.0
2011 147:00 ./mongod fork logpath /d0/db/mongod.log
ponad 5 miesięcy działania
średnio co 30min wszystkie dane są wymienione
10mln rekordów w bazie – zawsze !
4GB na dysku
!! Wesje 2.x działają DUŻO lepiej niż wcześniejsze !!