下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、关于mongodb 的oplogmongodb的repliion是通过一个日志来存储写操作的,这个日志就叫做oplog。 在默认状况下,对于64位的mongodb,oplogs都相当大-可能是5%的磁盘空间。通常而言,这是一种合理的设置。可以通过mongod -oplogsize来转变oplog的日志大小。 oplog的lectio为: local.oplog.$main for master/slave replication; local.oplog.rs for replica s 如 master/slave replication: use local switch to db lo
2、cal db.oplog.$main.help() dbcollection help db.oplog.$main.().help() - show dbcursor help db.oplog.$main.count() db.oplog.$main.datasize() db.oplog.$main.distit( key ) - eg. db.oplog.$main.distinct( x ) db.oplog.$main.drop() drop the collection db.oplog.$main.dropind(name) db.oplog.$main.dropindexes
3、() db.oplog.$main.enreindex(keypattern,options) - options should be an object with these possible fields: name, ue, dropdups db.oplog.$main.reindex() db.oplog.$main.find( query , fields) - first parameter is an optional query filter. second parameter is optional set of fields to return. e.g. db.oplo
4、g.$main.find( x : 77 , name : 1 , x : 1 ) db.oplog.$main.find(.).count() db.oplog.$main.find(.).limit(n) db.oplog.$main.find(.).skip(n) db.oplog.$main.find(.).(.) db.oplog.$main.findone(query) db.oplog.$main.findandmodify( up : . , remove : bool , query: , sort: , new : fae ) db.oplog.$main.getdb()
5、get db object associated with collection db.oplog.$main.getindexes() db.oplog.$main.group( key : ., initial: ., rece : ., cond: . ) db.oplog.$main.mapreduce( mapfunction , reducefunction , optional params ) db.oplog.$main.remove(query) db.oplog.$main.renamecollection( newname , droptarget ) renames
6、the collection. db.oplog.$main.runcommand( name , options ) runs a db command with the given name where the first param is the collection name db.oplog.$main.save(obj) db.oplog.$main.s() db.oplog.$main.storagesize() - includes space ald to this collection db.oplog.$main.totalindexsize() - size in by
7、tes of all the indexes db.oplog.$main.totalsize() - storage allocated for all data and indexes db.oplog.$main.update(query, object, upsert_bool, multi_bool) db.oplog.$main.valate() - slow db.oplog.$main.getshardversion() - only for use with sharding db.oplog.$main.find() ts : t : 1294582140000, i :
8、14 , op : d , ns : mixi_top_city.building_90 , b : ue, o : _id : 6380690_441_30_29 ts : t : 1294582140000, i : 15 , op : i , ns : mixi_top_city.building_90 , o : _id : 6380690_441_24_24 , uid : 6380690 , x : 24, y : 24, pos : 1, b : 1294154452, ntime : 1294154452, bid : 71, extprop : 0, status : 0,
9、ucid : 441 ts : t : 1294582140000, i : 16 , op : u , ns : mixi_top_city.building_64 , o2 : _id : 16702364_459_14_14 , o : $set : status : 1 ts : t : 1294582140000, i : 17 , op : u , ns : mixi_top_city.building_08 , o2 : _id : 6223408_391_30_28 , o : $set : ntime : 1294582321 ts : t : 1294582140000,
10、i : 18 , op : u , ns : mixi_top_city.building_03 , o2 : _id : 9882403_353_28_20 , o : $set : ntime : 1294600141 ts : t : 1294582140000, i : 19 , op : u , ns : mixi_top_city.building_24 , o2 : _id : 4162924_365_32_28 , o : $set : ntime : 1294582321 ts : t : 1294582141000, i : 1 , op : u , ns : mixi_t
11、op_city.building_49 , o2 : _id : 32797749_285_28_30 , o : $set : ntime : 1294583341 ts : t : 1294582141000, i : 2 , op : u , ns : mixi_top_city.building_50 , o2 : _id : 33768850_425_28_32 , o : $set : ntime : 1294582561 ts : t : 1294582141000, i : 3 , op : u , ns : mixi_top_city.building_35 , o2 : _
12、id : 28235635_333_28_36 , o : $set : ntime : 1294582741 ts : t : 1294582141000, i : 4 , op : u , ns : mixi_top_city.building_04 , o2 : _id : 25178304_3_32_28 , o : $set : ntime : 1294594141 ts : t : 1294582141000, i : 5 , op : u , ns : mixi_top_city.building_18 , o2 : _id : 7304918_445_32_26 , o : $set : ntime : 1294582321 ts : t : 1294582141000, i : 6 , op : u , ns : mixi_top_city.building_93 , o2 : _id : 5003293_453_20_24 , o : $set : status : 1 ts : t : 1294582141000, i : 7 , op : u , ns : mixi_top_city.building_59 , o2 : _id
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 深圳2025年广东深圳市光明区面向市内选调职员20人笔试历年参考题库附带答案详解
- 楚雄2025年云南楚雄禄丰市紧密型医共体招聘编制外工作人员40人笔试历年参考题库附带答案详解
- 文山云南文山马关县紧密型县域医疗卫生共同体总医院马关县中医医院招聘笔试历年参考题库附带答案详解
- 宁波浙江宁波余姚市托育综合服务中心(市托育园)第二次编外招聘7人笔试历年参考题库附带答案详解
- 哈尔滨2025年黑龙江哈尔滨铁道职业技术学院招聘辅导员笔试历年参考题库附带答案详解
- 儋州2025年海南儋州市人民医院(儋州市人民医院医疗集团总院)招聘17人笔试历年参考题库附带答案详解
- 智研咨询-中国卤水碳酸锂行业市场全景调查、投资策略研究报告
- 耐药菌监测网络效能提升策略研究
- 人行大集中统计制度
- 卫生院关于医保奖惩制度
- 《筑牢安全防线 欢度平安寒假》2026年寒假安全教育主题班会课件
- 信息技术应用创新软件适配测评技术规范
- 养老院老人生活设施管理制度
- 2026年税务稽查岗位考试试题及稽查实操指引含答案
- (2025年)林业系统事业单位招聘考试《林业知识》真题库与答案
- 2026版安全隐患排查治理
- 道路施工安全管理课件
- 2026年七台河职业学院高职单招职业适应性考试备考题库有答案解析
- 肉瘤的课件教学课件
- 办公楼电梯间卫生管理方案
- 新生儿休克诊疗指南
评论
0/150
提交评论