WWW.DBVERSITY.COM
WWW.DBVERSITY.COM
Menu
  • Home
  • About us
  • Discussions
  • Login / Register
Welcome to the world of Database Technologies
Browse: Home » tag aware

MongoDB Tag-aware sharding script

March 30, 2016 · by dbversity · in MongoDB

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…

[MongoDB]: Tag aware sharding

November 6, 2014 · by dbversity · in MongoDB

MongoDB supports tagging a range of shard key values to associate that range with a shard or group of shards. Those shards receive all inserts within the tagged range. The balancer obeys tagged range associations, which enables the following deployment…

Categories

Categories

Copyright © 2025 WWW.DBVERSITY.COM

Powered by WordPress and Origin