MongoDB is a scalable, high-performance, open source, document-oriented database. It supports a large number of languages and application development platforms. Questions about programming should be asked on http://stackoverflow.com.

learn more… | top users | synonyms

4
votes
2answers
872 views

Sharded key-value store using MongoDB

Would like to set up a key-value store that is sharded across multiple machines. We are currently using MongoDB, is there a reason why we shouldn't use MongoDB for this purpose? We also use Redis, ...
1
vote
1answer
887 views

Is it possible to upgrade MongoDB from 2.0 to 2.4 directly

We have a replica set with 2 members and one arbiter in production. 10gen documentation states that 2.0 to 2.2 is a binary-compatible “drop-in" upgrade and so it's 2.2 to 2.4. Is it safe to upgrade ...
3
votes
3answers
947 views

Relational vs Non-Relational Database for Events Database

I'm trying to find out whether an SQL or no-SQL solution would be better for creating an events database. I'm creating a ticketing system, similar to ticket master. I know that for either ...
1
vote
2answers
5k views

To find a version for your pc check with the software publisher install mongodb

I want to install MongoDb on windows 8 but when i try to run C:\mongodb\bin\mongod.exeiget this error: To find a version for your pc check with the software publisher.
0
votes
1answer
613 views

admin user can not login to other databases after upgrading to mongodb 2.4

I had a mongodb 2.2 database with auth enabled. but after upgrading to 2.4 my admin user can not login to any database other than admin database. I removed it from system.users then created another ...
-1
votes
1answer
632 views

Getting next and previous document

In a mongo collection I have a list of words (millions words). {word:'a'} {word:'b'} {word:'x'} {word:'y'} {word:'z'} I need to get lexical adjacent of a word. I am looking for most efficient ...
36
votes
5answers
7k views

Which database could handle storage of billions/trillions of records?

We are looking at developing a tool to capture and analyze netflow data, of which we gather tremendous amounts of. Each day we capture about ~1.4 billion flow records which would look like this in ...
10
votes
1answer
4k views

Using MongoDB and PostgreSQL together

My current project is essentially a run of the mill document management system. That said, there are some wrinkles (surprise, surprise). While some of the wrinkles are fairly specific to the ...
2
votes
1answer
459 views

MongoDB: move documents before capping

The cappedCollection concept works well for most of my projects where cleaning old data without care makes sense. For another projects, I need a more complex and safe concept. The requirement is ...
1
vote
1answer
313 views

Structuring data in MongoDB for a to-do list type application

This is a fairly high level question as I am in the initial stages of planning this application, and am also very new to MongoDB and document-based databases in general. Disclaimer aside, I am ...
5
votes
1answer
367 views

Overview of how MongoDB uses its various threads

On one instance I have MongoDB using ~85 threads. In lieu of having time to investigate directly, I am curious: What are the threads used for? Do they fall into a few high-level usage categories? ...
1
vote
1answer
262 views

MongoDB: Aggregation workaround by helper collection

Since I regularly run against mongodb's document size limit and also aggregation framework's group limitations >16M, depending on the amount of data I need to process, I look for a simple workaround. ...
1
vote
1answer
98 views

Which database is designed for storing and incrementing values?

We're trying to build a stats server that stores visits for each document on a section for a specific date, so we need a table that has the following parameters: documentID sectionID date visits ...
0
votes
0answers
17 views

Mongo replication lag slowly increasing [duplicate]

I am running a replica-set in production with slaveOk = false using mongo 2.0.7 in AWS The replication lag on one of the servers is close to 58 hours. This replication lag is sometimes decreasing ( at ...
1
vote
1answer
181 views

Mongo replication lag slowly increasing

I am running a replica-set in production with slaveOk = false using mongo 2.0.7 in AWS The replication lag on one of the servers is close to 58 hours. This replication lag is sometimes decreasing ( at ...
1
vote
0answers
106 views

Where Hadoop Stands at MongoDB Side [closed]

I am making a research about Machine Learning and planning to use NoSQL databases. I know that MongoDB is a powerful solution. However I want to learn that where Hadoop stands for MongoDB side. My ...
2
votes
0answers
132 views

automated data sync after Primary node is down

I have this scenario, using version 2.2.2: Node A, Primary, Priority: 10, Wireless network Node B, Secondary, Priority: 9, VM Server1 Node C, Secondary, Priority: 8, VM Server1 Sequence: In Node ...
1
vote
1answer
303 views

mongodb heartbeat - unicast, broadcast or multicast?

I can't find any good doc or article (except http://docs.mongodb.org/manual/core/replication-internals/) about this in the internet. Anyone knows how mongodb heart beat signal operates? The reason ...
1
vote
1answer
185 views

How can I use mongoDB efficiently in this scenario?

I'm trying to build a system of documents that have hundreds of tags assigned to them, but each document-tag association has a certain condition it has to also meet so the document would be returned: ...
1
vote
2answers
2k views

MongoDB - Should I separate the journal and the data to different drives?

I have seen and heard from multiple sources that it can be a good idea, performance-wise, to write your db journal and your data files to separate disks. What's the recommended way to do this (e.g. ...
0
votes
2answers
628 views

MongoDB Master and Slave Replication - Windows or Linux

I have recently moved my MS SQL Server Database to MongoDB (2.0) on Windows Server 2008. Its containing 2 databases with following stats. (both databases get around 100 reads/writes per second). These ...
1
vote
2answers
1k views

Huge index for covered queries (indexOnly: true) or (indexOnly: false) with collection scan

I have two questions, I'll give you the facts, then my questions. The actual index I'm using for one of my queries has the following characteristics : Multikey (contains 4 keys). The average key ...
0
votes
1answer
60 views

assistance with mongodb setup on windows server

I am currently setting up Mongo DB on a dedicated web server. I am not experienced with Mongo so I have some questions around its setup. I have done research in to Mongo etc but would like some ...
3
votes
1answer
1k views

Limit memory used for mongoDb

Is there any way to limit using RAM for mongodb on Debian? I'm looking for a solution fo about 8 hours, but have no results.
2
votes
2answers
335 views

Schema design for privacy settings in MongoDB

I have a set of documents that can have various privacy settings around them: They can be completed public (any registered user) can view them They can be viewable only by people following you (this ...
2
votes
1answer
178 views

Which database to use? [closed]

Hey there. I am looking for a free to use for commercial website database that should have these design features, in the given order: Auto-Sharding (getting more free space by adding more server ...
0
votes
1answer
50 views

How to save mongodb data sub data more properly in this case?

I have a business collection. The businesses are reviewed by users. Each user can only review a business once. Future reviews will simply replace the former one. This is how we store it: ...
7
votes
1answer
2k views

MongoDB Not Using All Available RAM

I have something around 200 GB worth data stored in a mongo cluster. The physical memory on one of the instances which runs mongo is 8GB. Nothing else of any consequence runs on this instance. As near ...
1
vote
2answers
330 views

Mongodb multikey index and $all in queries

I have such structure of documents in my products collection: { title: 'Samsung Galaxy S III', category_id: ObjectId("50bcc2f0b910a6c1936a4424"), properties: [ { title: 'OS', ...
1
vote
1answer
65 views

Sharded Mongodb Communication

I would like to know what ports I need have open for a sharded mongodb cluster. For example does the mongos need to be able to accapt connections to and from mongoc. I dont want to have to many open ...
3
votes
1answer
2k views

MongoDB: What does '[DataFileSync] flushing mmaps took … ms for … files' mean?

I am building an index in MongoDB for a large collections (~300GB) and the db terminal window keeps printing: [DataFileSync] flushing mmaps took 10920ms for 151 files The time that it takes to ...
1
vote
1answer
271 views

Books to start with big data [closed]

I would like to start learning about the big data technologies. I work in this area in the future. Does anyone know good books to start learning about it? Hadoop, HBase. Beginner - intermediate - ...
0
votes
1answer
712 views

RegEx bug in MongoDB

I run the following queries on a collection that have a lot of entries that contain [ and ]. db.test.find({word:/[\[]/}); // could not be run in console db.test.find({word:/\[/ }); ...
1
vote
2answers
1k views

Disk space recovery on Mongodb replicaset secondaries

Is it possible to recover disk space on replica set secondaries based on the results of a repairDatabase call performed on a primary? I can't seem to locate anything that would work short of bringing ...
2
votes
2answers
273 views

Sharded MongoDB backup solution

I am looking for a way that I can backup my 12 MongoDB shards into a single server. Disk space is not an issue but getting the backups to be on a single node would be the best. I am not sure if there ...
2
votes
2answers
3k views

Mongo replicated shard member not able to recover, stuck in STARTUP2 mode

I have following setup for a sharded replica set in Amazon VPC: mongo1: 8G RAM Duo core (Primary) mongo2: 8G RAM Duo core (Secondary) mongo3: 4G RAM (Arbiter) Mongo1 is the primary ...
2
votes
2answers
568 views

mongodb service not running after changing path

I have changed the dbpath of mongodb.conf. And after that trying to start mongodb service,when I run sudo service mongodb start I get back mongodb start/running, process 7320 After that I run: ...
0
votes
1answer
325 views

Choosing shard key and friendly URL Ids for my MongoDB

I have decided to use MongoDB as my Database for a web application. However, I have some difficulties to get started and I hope that you can help me out with a few questions. I am developing my ...
5
votes
1answer
205 views

Management tool for managing MongoDB sharded cluster

Is there a database management software for MongoDB that makes it easy to create a cluster, add shards, backup shards and all the complicated stuff. There are some many MongoDB clients but they are ...
2
votes
1answer
269 views

Preserving whitespace in MongoDB values

In a simple scenario of me inserting a key-value pair, when value contains some white space, how can I preserve it? Example: > > db.bar.insert({"name":"mike "}) > > db.bar.find() { ...
3
votes
1answer
823 views

MongoDB geospatial query with sort - performance issues

I have query (which is very slow ~2,5s): db.markers.find({ latlng: { '$within': { '$box': [ [ -16, -140 ], [ 75, 140 ] ] } } }).sort({_id: -1}).limit(1000) When I run explain for this query I get ...
0
votes
1answer
2k views

How to keep Mongodb log small via the conf file (or other persistent method)

This is related to my question in stackoverflow where vb.net simply hang on updating a mongodb query. http://stackoverflow.com/questions/12780258/insert-mongodb-using-vb-net/12796593#12796593 After ...
2
votes
1answer
2k views

Can't start mongodb in ArchLinux

I have installed mongodb using sudo pacman -S mongodb in my 32-bit arch . At first I run this sudo mkdir -p /data/db to create /data/db ,and then run $ mongod ,then I got the following message : ...
0
votes
1answer
276 views

Moving a collection to a new database (v2.2)

To take advantage of the improved concurrency in Mongodb 2.2--namely database level locking--we would like to move a sharded collection to a new database. I have been unable to find any documentation ...
1
vote
1answer
140 views

Riak in SasS application

I am thinking about using Riak for a SasS application I started working on recently. I was originally thinking about MongoDB but after running into Riak it seems like it may be the better option. The ...
2
votes
1answer
2k views

Error “cannot connect to server” installing MongoDB on Ubuntu

I'm trying to install MongoDB on Ubuntu 10.04. I followed these installation instructions. I got the following error: Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91 ...
0
votes
1answer
92 views

Why searching with $all in Mongodb is FAR SLOWER than the EQUIVALENT search?

$all with only one item is equivalent with normal search right? Here is the log without $all (I used 4700 test cases with 30 thread): Thu Sep 20 17:27:05 [conn11] query newisikotagte15.tablebusiness ...
2
votes
1answer
1k views

Storing dictionaries in mongo

Is there any reliable and fast database architecture that allows to store a dictionary(containing up to hundred thousand words) using mongodb?
2
votes
1answer
255 views

Best embed/reference/field strategy for many inserts (mongo)

I'm building a gaming backend with Mongo, and have some issues on how to best design the schema to maximize performance and database size. My models: User Match -ReferenceMany (User) ...
0
votes
1answer
56 views

Why $in is much faster then $all

I am well aware of what those 2 do. $in take .3 seconds. And $all take 26 seconds. Huge different. If anything $in should take longer because it returns more data. Also if the limit is removed, $in ...