[MongoDB]: How to simulate read/write transactions manually
[root@dbversity ~]$ /opt/mongodb/bin/mongo MongoDB shell version: 2.6.9 connecting to: test > > // To simulate write (inserts) transactions > for(var i = 1; i <= 10000000 ; i++){db.test_collection.insert({“_id” : i , “action” : “write transaction simulations”, ” iteration no:” :…
3T MongoChef – Your New MongoDB GUI
Official website : http://3t.io/ Compare databases, collections and documents: discover differences in your data. See the differences, side by side: visualize comparison results. Built in synchronization: synchronize databases, collections, and fields. Explore the schema of your MongoDB data: find outliers and…
[MongoDB]: Working with shards
ReplicaSet 1 (rs1) : =================== ./mongod –shardsvr –replSet rs1 –dbpath /data/rs1_1 –logpath /data/rs1_1/rs1_1_mongod.log –port 27010 –smallfiles –nojournal –quiet & ./mongod –shardsvr –replSet rs1 –dbpath /data/rs1_2 –logpath /data/rs1_2/rs1_2_mongod.log –port 27011 –smallfiles –nojournal –quiet & ./mongod…
[MongoDB]: How can I create a user with hash password insert with __system role.
__system¶ MongoDB assigns this role to user objects that represent cluster members, such as replica set members and mongos instances. The role entitles its holder to take any action against any object in the database. Do not assign this role…
[MongoDB]: How to configure & reconfigure a RS
[root@ip-10-0-0-28 /]# ps -ef | grep mongo root 7135 2216 0 01:26 pts/0 00:00:00 mongod –replSet rs2 –dbpath /root/data4 –logpath /root/data4/mongod1.log –port 27010 –smallfiles –nojournal root 7191 2216 0 01:26 pts/0 00:00:00 mongod –replSet rs2 –dbpath /root/data5 –logpath /root/data5/mongod2.log –port…
[MongoDB]: Aggregation with date
When we need to count the number of subdocuments based on certain criteria, including a date field. Looking for options on how best to handle the date field for this requirement. Sample document: { “_id” : “FCa123”, “txnUidSid” : “123”,…
[MongoDB]: How to truncate/chop off time-stamp from Date
How to truncate/chop off time-stamp from Date > db.dbversity.find({},{tradeDate:1}) { “_id” : “1”, “tradeDate” : ISODate(“2015-06-25T18:30:00Z”) } { “_id” : “2”, “tradeDate” : ISODate(“2015-06-25T18:30:00Z”) } { “_id” : “3”, “tradeDate” : ISODate(“2015-06-24T18:30:00Z”) } { “_id” : “4”, “tradeDate” : ISODate(“2015-06-23T18:30:00Z”)…
[CouchBase] : How Wierd is MongoDB + WiredTiger?
How Wired is MongoDB + WiredTiger? MongoDB 3.0 is a major release with long awaited improvements. The most notable? The optional storage engine WiredTiger. After all, WiredTiger was founded by the people behind Berkeley DB. MongoDB claims WiredTiger write performance…
MongoDB WiredTiger
A Technical Introduction to WiredTiger Document-level Concurrency In-memory performance Multi-core scalability Checksums Compression Durability with & without journaling MongoDB 3.0 introduces a new pluggable storage engine API and a new storage engine called WiredTiger. The engineering team behind WiredTiger…
[MongoDB]: Aggregation with $unwind for querying subdocuments in an Array
[ root @ dbvesitydotcom : ~ ] mongo MongoDB shell version: 2.6.5 connecting to: test > > > use dbversity_db switched to db dbversity_db > > db.mycol.insert({L1F1:”val1″,L1F2:[{L2F1:”val2″,L2F2:”val3″,L2F3:[{L3F1:”val50″, L3F2:”val51″,L3F3:”val52″},{L3F1:”val53″, L3F2:”val54″,L3F3:”val55″}]},{L2F4:”val4″,L2F5:”val5″}]}) WriteResult({ “nInserted” : 1 }) > > > db.mycol.find().pretty() { …