search

Home  >  Q&A  >  body text

Mongodb删除数据库后为什么数据文件还存在?

Mongodb删除数据库后为什么数据文件还存在?

循环插入了1kw条数据。然后在rockmongo中删除了这个数据库。但是数据目录还是有一堆文件存在,而且还不小。

怪我咯怪我咯2766 days ago682

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-21 11:21:02

    After deleting the database, there is still pre-allocated space on the disk, so you need to execute:

    db.repairDatabase()

    PS: It is not recommended to use it in an online environment, as it may cause excessive load and service interruption.

    reply
    0
  • Cancelreply