mgholam / RaptorDB-Document

NoSql, JSON based, Document store database with compiled .net map functions and automatic hybrid bitmap indexing and LINQ query filters (now with standalone Server mode, Backup and Active Restore, Transactions, Server side queries, MonoDroid support, HQ-Branch Replication, .net core v2.0, .net standard v2.0)
http://www.codeproject.com/Articles/375413/RaptorDB-the-Document-Store
MIT License
163 stars 39 forks source link

How to reduce the size of .mgbmp file ? #12

Open netwenchao opened 5 years ago

netwenchao commented 5 years ago

How to reduse the size of .mgbmp file ? RemoveKey only remove key from idx and mark the storageitem in *.mgbmp as deleted.

But the file size has not decreased. Is there anyway to remove storageitem from raptordb??

mgholam commented 5 years ago

The bitmap index has an Optimize() method which is currently only being used by the hOOt full text index, I will add this to all other indexes.

No you can't remove a StorageItem as it is by design, if you are working with transient data use the high frequency storage instead.

Thanks.

netwenchao commented 5 years ago

The bitmap index has an Optimize() method which is currently only being used by the hOOt full text index, I will add this to all other indexes.

No you can't remove a StorageItem as it is by design, if you are working with transient data use the high frequency storage instead.

Thanks.

After the system has been running for a while, the size of the .mgbm file is increasing (currently 7G). I need to periodically delete the old data to reduce the disk space.

But the most recent data needs to be retained. Is there any other way?

mgholam commented 5 years ago

Ah! Interesting.

Can you answer a few questions for me: