Building a MongoDB 4.0.2 Sharded Cluster
http://dbversity.com/wp-content/uploads/2019/01/Building-a-Sharded-Cluster.docx
Depth of nested fields in MongoDB
var spaceChar = ‘ ‘; function getParentNames(jsstr, n, pos) { if (n <= 1) { return “”; } else { var spacesBeforeParent = jsstr.substr(pos, n) + ‘”‘; var indexParent = jsstr.lastIndexOf(spacesBeforeParent, pos); if (indexParent > 0) { var posParent =…
How to Rock with MyRocks !!
Please join Percona’s Chief Technology Officer, Vadim Tkachenko as he presents “How to Rock with MyRocks” on, Thursday, January 17th at 10:00 AM PST (UTC-8) / 1:00 PM EST (UTC-4). MyRocks is a new storage engine from Facebook and is…
MongoDB Charts is now available in beta on MongoDB Atlas
MongoDB announced that MongoDB Charts is now available in beta on MongoDB Atlas. MongoDB Charts is the best way to create, view, and share real-time visualizations of MongoDB data with no code to write, no tools to configure, and no data movement…
[MognoDB]: How to know the configured parameters without looking at mongod.conf/startup command.
serverCmdLineOpts is the command line option to check the mongod server configured values without looking at mongod.conf or startup script. This is something like standard RDBMS ‘s “SHOW GLOBAL VARIABLES;” It returns a document that reports on the arguments…
[MongoDB] : Understanding ObjectId() vs UUID()
ObjectId() Returns a new ObjectId value. The 12-byte ObjectId value consists of: a 4-byte value representing the seconds since the Unix epoch, a 5-byte random value, and a 3-byte counter, starting with a random value. ObjectId() can accept the following…
[MongoDB]: Save vs Insert & Save vs Update
For save, if you provide _id, it will update. If you don’t, it will insert. To elaborate, if a document does not exist with the specified _id value, the save() method performs an insert with the specified fields in the…
How to identify the which collection and index files from dbpath belongs to which collection or index
Easy way to do this is just enable –directoryperdb & —wiredTigerDirectoryForIndexes while starting the mongod, but still if you’ve multiple collections, indexes in a database you can not figure it out while collection files & index files belongs to the respective collection/index….
Getting performance Improvement with keeping MongoDB Index files in a separate disk partition
When you start mongod with –wiredTigerDirectoryForIndexes, mongod stores indexes and collections in separate subdirectories under the data (i.e. –dbpath) directory. Specifically, mongod stores the indexes in a subdirectory named index and the collection data in a subdirectory named collection….