The data file size do not shrink down when delete from ravendb

独自空忆成欢 提交于 2019-12-23 09:50:06

问题


I used the following code to delete documents from RavenDB. At the bottom of Raven UI, I can see the number of documents decrease from 3,000,000 to 2,000,000. But the size of the "Data" file does not shrink down. It is always about 100G.

            store.DatabaseCommands.DeleteByIndex("Sagas/ByStarted", new IndexQuery
            {
                Query = "Started:{00010101000000 TO 20130101000000}",
            });

Server Build #960, Client Build #960 Please help ...


回答1:


That is by design. We don't give out space back to the OS by default. We keep and reuse that space again as needed. If you really need to trim the file size, you would need to compact the db, but that is an offline operation.



来源:https://stackoverflow.com/questions/17256673/the-data-file-size-do-not-shrink-down-when-delete-from-ravendb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!