[MongoDB]: Tag aware/Data centre aware sharding
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…
[MongoDB]: shutdown script
[root@dbversity bin]$ cat shutdown_script.sh #!/bin/bash BIN=/tmp/mongodb/bin DB=admin HOST=`hostname` UN=adm PW=pwd #PW=`cat /root/.pwd.txt` cd $BIN MONGOPID=`ps -ef | egrep ‘mongod|mongos’ | grep -v egrep | awk ‘{print $2}’` if [ -z $MONGOPID ]; then echo “There are no Mongo processes are…
[MySQL]: YCSB with MySQL
[user@myhostname ~]$ [user@myhostname ~]$ sudo su [sudo] password for user: [Lab root @ myhostname /mysql]# tar -zxvf MySQL-5.6.19-1.el6.x86_64.rpm-bundle.tar.gz MySQL-embedded-5.6.19-1.el6.x86_64.rpm MySQL-devel-5.6.19-1.el6.x86_64.rpm MySQL-client-5.6.19-1.el6.x86_64.rpm MySQL-shared-compat-5.6.19-1.el6.x86_64.rpm MySQL-server-5.6.19-1.el6.x86_64.rpm MySQL-shared-5.6.19-1.el6.x86_64.rpm MySQL-test-5.6.19-1.el6.x86_64.rpm [Lab root @ myhostname /mysql] [Lab root @ myhostname /mysql]# ll -lhtr total 415M -rw-r–r–…
[MongoDB]: how to get better performance for mongoimport operation
1) Check if your db/collection have many indexes? If so we could test if reducing the number of indexes is an option, based on your reads and query patterns. 2) Since prior to MongoDB 3.0, locking is at Database level…
MongoDB Replication video at Dbversity.com
https://www.youtube.com/watch?v=bZsZwkOzh7w&feature=youtu.be
[MongoDB] : DBQuery.Option.partial
If a shard is inaccessible or unavailable, queries will return with an error. However, a client may set the partial query bit, which will then return results from all available shards, regardless of whether a given shard is unavailable. The…
[MongoDB]: what happend to your queries when any shard (complete RS) goes down
We observed when any complete shard (all nodes in that replica set) got down, all the queries which involved data from that down shard are giving failures as below. Want to know whether it’s expected behavior ? mongos> db.shrcol.count() Thu…
[MognoDB]: How do I enable Sharding (draft version)
To enable sharding :- ================== sh.addShard(“rs1/ip-10-0-0-197:27010,ec2-52-7-8-107.compute-1.amazonaws.com:27011”) sh.addShard(“rs2/ip-10-0-0-197:27020,ec2-52-7-8-107.compute-1.amazonaws.com:27021”) use shard_db db.shard_col.ensureIndex( { user_id : 1 }, { unique : true }) sh.enableSharding(“shard_db”) sh.shardCollection(“shard_db.shard_col”, {“user_id”:1}) sh.startBalancer() sh.getBalancerState() sh.isBalancerRunning() use shard_db for(var i = 1; i <= 100000 ; i++){db.shard_col.insert({“user_id” : i ,…
[MongoDB]: Index Data
Question : – ============================================ I’ve a quick question on Covered/IndexOnly Index – it’s saying query goes to index collection – not to actual collection; but I don’t see any entries in system.indexes collections except 2 – I’m little confused here….