This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sat Apr 5 22:29:54 [conn99] command serverside.$cmd command: { getlasterror: 1, w: "majority" } ntoreturn:1 keyUpdates:0 reslen:112 1006370ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mloginfo mongod.log --queries | |
| QUERIES | |
| namespace pattern count min (ms) max (ms) mean (ms) 95%-ile (ms) sum (ms) | |
| serverside.scrum_master {"datetime_used": {"$ne": 1}} 20 15753 17083 16434 17039.3 328692 | |
| serverside.django_session {"_id": 1} 562 101 1512 317 842.6 178168 | |
| serverside.user {"_types": 1, "emails.email": 1} 804 101 1262 201 684.85 162311 | |
| local.slaves {"_id": 1, "host": 1, "ns": 1} 131 101 1048 310 819.5 40738 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.status() | |
| --- Sharding Status --- | |
| sharding version: { | |
| "_id" : 1, | |
| "version" : 3, | |
| "minCompatibleVersion" : 3, | |
| "currentVersion" : 4, | |
| "clusterId" : ObjectId("5314f1487abd6cb2803696d6") | |
| } | |
| shards: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.status() | |
| --- Sharding Status --- | |
| sharding version: { | |
| "_id" : 1, | |
| "version" : 3, | |
| "minCompatibleVersion" : 3, | |
| "currentVersion" : 4, | |
| "clusterId" : ObjectId("53616554992f1bbce576f9fd") | |
| } | |
| shards: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mongorestore -d enron -c messages enron/messages.bson |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var configdb = db.getSiblingDB("config") | |
| configdb.tags.find().pretty() | |
| { | |
| "_id" : { | |
| "ns" : "enron.messages", | |
| "min" : { | |
| "date" : { "$minKey" : 1 } | |
| } | |
| }, | |
| "ns" : "enron.messages", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sh.status() | |
| --- Sharding Status --- | |
| ... | |
| "clusterId" : ObjectId("53616554992f1bbce576f9fd") | |
| } | |
| shards: | |
| { "_id" : "shard0000", "host" : "Server1:27017", "tags" : [ "current" ] } | |
| { "_id" : "shard0001", "host" : "Server2:27017", "tags" : [ "tier-2" ] } | |
| { "_id" : "shard0002", "host" : "Server3:27017", "tags" : [ "tier-2" ] } | |
| databases: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Add the tags | |
| sh.addTagRange('enron.messages',{date:MinKey},{date:ISODate("2001-07-01")},'tier-2') | |
| sh.addTagRange('enron.messages',{date:ISODate("2001-07-01")},{date:MaxKey},'current') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| db.messages.ensureIndex({date:1}) | |
| sh.shardCollection('enron.messages',{date:1}) | |
| { "collectionsharded" : "enron.messages", "ok" : 1 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use enron | |
| switched to db enron | |
| db.createCollection("messages") | |
| { "ok" : 1 } | |
| sh.enableSharding("enron") | |
| { "ok" : 1 } |