How to manage max connections in MongoDB ?
Would like to know – how to manage (max) connections in MongoDB ? 1) How to know how many configured ? 2) How to change ? 3) How to know how many connections are being used ? Answer :…
MongoDB Q&A
1. Define MongoDB. It is document oriented database which is used to high availability, easy scalability and high performance. It supports the dynamic schema design. 2. Explain replica set. It is a group of mongo instances that maintain same…
MongoDB 3.2 is out finally …
MongoDB Inc., excited to announce MongoDB 3.2, their latest and most significant release yet. With 3.2, they have increased the range of mission-critical use cases they serve, enabling you to standardise on a single database for your modern applications. To learn more about…
Backing-up the MongoDB’s sharded cluster
Considerations : 1) Stop the balancer before capturing a backup. If the balancer is active while you capture backups, the backup artifacts may be incomplete and/or have duplicate data, as chunks may migrate while recording backups. 2) Take a backup…
How to know MongoDB’s Memory fragmentation ?
/* * MongoDB fragmentation estimator, this is only a guide / example. * THIS SCRIPT IS NOT FOR PRODUCTION USE, IT IS FOR DEMONSTRATION PURPOSES ONLY * To execute on a locally running mongod on default port (27017), run: * mongo getMongoFragmentation.js…

MongoDB Balancer Tips …
Run the balancer at low traffic times mongos> db.settings.update({_id: “balancer”}, {$set : { activeWindow: { start: “9:00”, stop: “21:00”}}}) mongos> mongos> mongos> db.settings.find() { “_id” : “chunksize”, “value” : 64 } { “_id” : “balancer”, “activeWindow” : {…
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…
Why MongoDB Compass ?!
Know your data with seamless schema visualization MongoDB Compass analyzes your documents and displays rich structures within your collections in a simple and intuitive GUI. It allows you to quickly visualize and explore your schema to understand the frequency, types…
set/unset the fields with another fields in mongo
Question : How can I update a field with another field value in the same document (in both array & embedded sub documents) From the attached JSON document, I would like to update ‘analyticUsers.geid’ to : ‘analyticUsers._id’ & tried all…