mongodb杂记
1. 重命名collectiondb.runCommand({"renameCollection": "namespace.a", "to": "namespace.b"});要在admin下操作 2. 删除记录不释放磁盘空间见 http://www.mongodb.org/display/DOCS/Excessive+Disk+SpaceDeleted Space
MongoDB maintains deleted lists of space within the datafiles when objects or collections are deleted.This space is reused but never freed to the operating system.To compact this space, run db.repairDatabase()from the mongo shell http://www.mongodb.org/images/icons/emoticons/warning.gifthis operation will block and is slow.When testing and investigating the>同时针对想释放空间的用户可以看以下2篇文章的讨论MongoDB data remove - reclaim diskspacehttp://stackoverflow.com/questions/5518581/mongodb-data-remove-reclaim-diskspace
页:
[1]