Tag Info

Hot answers tagged

2

No its not necessary to uninstall. I don't really like yum or apt for installing mongoDB. I suggest you to download the binaries from https://www.mongodb.org/dl/linux/x86_64 , linux/mongodb-linux-x86_64-ubuntu1404-3.1.0.tgz (or the v12) and use it to start mongodb.


2

Does the same data take more storage space in version 2.6? As noted in the MongoDB 2.6 release notes, the default storage allocation strategy changed from using exact-fit allocation with padding factor to usePowerOfTwoSizes. The powerOfTwoSizes allocation may take up more initial space, but generally results in less storage fragmentation and better reuse of ...


1

DISCLAIMER : Not a MongoDB Expert Check the process list in Linux WIREDTIGER_CONFIGURED=`ps -ef|grep mongod|grep -i storageengine|grep -ic wiredtiger` echo ${WIREDTIGER_CONFIGURED} 1 means it's there From the mongo shell db.serverStatus() You should see something like this "wiredTiger" : { ... "cache" : { "tracked dirty bytes in the ...


1

The maximum BSON document size is 16 megabytes but to store documents larger than the maximum size MongoDB uses GridFS as stated in other answer about size of the first file 64MB and size of new datafile that keep on getting double till the size of newly created file reaches to 2GB. Have a look at Mongo db data file


1

Data files are allocated in advance. The following is slightly simplified, for the sake of shortness. When a MongoDB database is created, an empty datafile with a size of 64 MB is created. As soon as data is written to this pristine data file, a background process creates a new datafile in order to have one ready of the first datafile is full. This will be ...


1

The source code may helps a lot. It's java but I guess it can help, too. The findOne(), DBObject findOne(DBObject o, DBObject fields, DBObject orderBy, ReadPreference readPref, long maxTime, TimeUnit maxTimeUnit) { QueryOpBuilder queryOpBuilder = new QueryOpBuilder().addQuery(o).addOrderBy(orderBy) ...


1

I can't test this at the moment, but that's the basic format. You should change your date data type to ISO so it works easily with the below code: var lastWeek = new Date(); lastWeek.setDate(lastWeek.getDate() -7); db.messages.find({ "rep_header.share_date_2.$date": { $gte: lastWeek} } } );



Only top voted, non community-wiki answers of a minimum length are eligible