Closed pdelbeato closed 4 years ago
compactCollection on collection or compactDatabase on database (will compact all collections). Note that this operation is non destructive (can be called in realtime) but can take quite some time and will block all read and write operations while it running.
As wrote on the website "Safe persistence: TingoDB uses append only files for storing of collection documents. This ensures that you never lost all your data and can rollback to good copy if any damage happens." and that is perfect. But, considering my program runs for days and days, db size starts to grow in an unbearable manner. Is there a method to call a "compactation" of the db, as if I load it from zero? A sort of db.collection.compact(). Or do I have to close a db and open it again? Thanks.