1:local库是MongoDB的系统库,记录着时间戳和索引和复制集等信息 gechongrepl:PRIMARY> use local switched to db local gechongrepl:PRIMARY> show tables me oplog.rs replset.minvalid slaves startup_log system.indexes system.replset temp 2:local库下的每个集合分别记录的内容 local库下面的me集合保存了服务器名称…
What is a namespace in MongoDB? If you remove a document, does MongoDB remove it from disk? When does MongoDB write updates to disk? How do I do transactions and locking in MongoDB? How do you aggregate data with MongoDB? Why does MongoDB log so many…
1:Mongostat MongoDB2.6版本 MongoDB3.0版本 2:db.setProfilingLevel(2):打开profiler 类似于MySQL的slow log Profiler默认是关闭的,你可以选择全部开启,或者有慢查询的时候开启. db.setProfilingLevel(level,<slowms>) 0=off 1=slow 2=all > use test switched to db test > db.setProfilingLevel(2)…