MongoDB Tag-aware sharding script
Commands : use dbversity sh.status() sh.enableSharding(“dbversity”) db.nosql.ensureIndex({“mongodb” : 1}) db.rdbms.ensureIndex({“oracle” : 1}) db.newsql.ensureIndex({“memsql” : 1}) show collections sh.status() sh.shardCollection(“dbversity.nosql”, {mongodb:1}); sh.shardCollection(“dbversity.rdbms”, {oracle:1}); sh.shardCollection(“dbversity.newsql”, {memsql:1}); sh.status() for (var i=0; i<100000; i++) { db[“nosql”].insert({mongodb: Math.random(), count: i, time: new Date()}); } for…