Tagged Questions

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

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
16 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
164 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
131 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
280 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
178 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
601 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
58 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
968 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
305 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
177 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
47 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: ...
6
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
306 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
61 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
254 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
607 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
989 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
263 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
501 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
310 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
193 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
239 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
764 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
262 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
139 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
90 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
236 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 ...
1
vote
1answer
771 views

$nearSphere returns too many data. What am I missing? Am I wrong? Is it a bug? Does other see the same thing?

I noticed that $near and $nearSphere returns completely different data and I got suspicious. After all, when latitude is near equator it sphere distance shouldn't differ a lot from euclidean distance. ...
2
votes
1answer
2k views

What does reslen and other means in mongodb log?

database.tablebusiness query: { LongitudeLatitude: { $nearSphere: [ 106.772835, -6.186753 ], $maxDistance: 0.04498373205078301 }, Prominent: { $gte: 15 }, indexContents: { $all: [ /^aru/, /^op/ ] } } ...
0
votes
1answer
96 views

Is Index Used for This Query

If so, which one? How do we know? I have 3 indexes in a query. Actually only the first 2 should be useful { "v": NumberInt(1), "key": { "LongitudeLatitude": "2d", "Prominent"▼: ...
1
vote
1answer
864 views

How to interpret this “db.explain()” for this mongodb query

db.tablebusiness.find({ "LongitudeLatitude" : { "$within" : { "$centerSphere" : [[106.772835, -6.186753], 0.0089967464101566] } }, "indexContents" : { "$all" : ["warung"] }, "Prominent" : { "$gte" : ...
3
votes
2answers
7k views

Error: couldn't connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91 when changing mongodb data directory

I already change the owner of the directory I want to use root@ip-10-138-30-205:/media/newdrive# ls -l ...
3
votes
1answer
861 views

Mongo connection failing with 'Transport endpoint is not connected'

I have a 2 server installation. A web server with Apache and a DB server with MongoDB. I am load testing it, and on ~300 RPS I am getting this error: PHP Fatal error: Uncaught exception ...
-2
votes
1answer
233 views

Compare MongoDB and MySQL

Can anyone help me to make right decision for choosing scalable and reliable database? I have to create 3-4 tables with around 200 columns each and these tables will have around 5000 data records. As ...
1
vote
1answer
165 views

What's the fastest way to replicate data?

I have a mongodb database data on my computer. I want to upload that into amazon.com server. The bottle neck is the internet connection. One way is to zip the file and then upload it to the server. ...
3
votes
2answers
259 views

Does MongoDB auto compacting

I copy a collection to another collection. Data is 14GB. I deleted the copied collection. Yet the size of the directory is still 14 GB. I chose repair but it seems to take forever. Actually inserting ...
5
votes
1answer
4k views

Mongodb - Returning the points nearest to a location, with distance

What is the MongoDB's equivalent to this query: SELECT 111151.29341326 * SQRT( pow(-6.186753-`Latitude`, 2) + pow(106.772835-`Longitude`, 2) ...
0
votes
2answers
570 views

Where can I find manual and tutorial for rockmongo? [closed]

I tried to find it in google and couldn't find it. Most just tell how to install. None tell how to use execute, for example.
1
vote
2answers
956 views

Where can I get this nice phpMyadmin features for mongodb

In phpmyadmin Say I browse a table, or do anything. I will be told the actual sql command that I should run to execute the query. Say I want to do a query and then I want to do something else ...