Home > Database > Mysql Tutorial > MongoDB碎片整理之repairDatabase详解

MongoDB碎片整理之repairDatabase详解

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 16:13:18
Original
2758 people have browsed it

比起compact的只整理逻辑碎片.dbrepairDatabase,不仅能整理碎片还可以回收磁盘空间 基本用法: db.repairDatabase() db.runCommand({repairDatabase :1}) 注意点: 1.repairDatabase期间会产生锁,建议关闭应用后再进行此操作 2.repairDatabase所需要的磁盘

比起compact的只整理逻辑碎片.dbrepairDatabase,不仅能整理碎片还可以回收磁盘空间



基本用法:
> db.repairDatabase()
> db.runCommand({repairDatabase :1})


注意点:
1.repairDatabase期间会产生锁,建议关闭应用后再进行此操作
2.repairDatabase所需要的磁盘剩余空间需求很大
3.最后一点,这命令能不用最好别用{过来人的忠告}

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
mongodb start
From 1970-01-01 08:00:00
0
0
0
linux - ubuntu14 error installing mongodb
From 1970-01-01 08:00:00
0
0
0
Use of symfony2 mongodb
From 1970-01-01 08:00:00
0
0
0
mongodb _id rename
From 1970-01-01 08:00:00
0
0
0
Parameter understanding of mongodb
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template