从 ravendb 删除时数据文件大小不缩小 [英] The data file size do not shrink down when delete from ravendb

查看:52
本文介绍了从 ravendb 删除时数据文件大小不缩小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用以下代码从 RavenDB 中删除文档.在 Raven UI 的底部,我可以看到文档数量从 3,000,000 减少到 2,000,000.但是数据"文件的大小不会缩小.总是在 100G 左右.

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}",
            });

服务器版本 #960,客户端版本 #960请帮忙...

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

推荐答案

这是设计使然.默认情况下,我们不会将空间返还给操作系统.我们保留并根据需要再次使用该空间.如果您确实需要修剪文件大小,则需要压缩数据库,但这是离线操作.

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.

这篇关于从 ravendb 删除时数据文件大小不缩小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆