MongoDB : Document-Oriented NoSQL Database

learn more… | top users | synonyms

0
votes
1answer
218 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
137 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
89 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 ...
1
vote
1answer
853 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
192 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
55 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
663 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. ...
1
vote
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
89 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
734 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
6k 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
815 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
220 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
155 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
237 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 ...
4
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
510 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
797 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 ...
2
votes
2answers
2k views

How to display query result in rockmongo by using execute method

I executed a command in mongo.exe > db.tablebusiness.find({"_id": "the-simmons-paradise__41.85_-87.88"}); I got results: Now I try similar command in rockmongo. If I execute ...
3
votes
2answers
855 views

mongoDB rs.initiate hangs

I am having trouble setting up replication on a new mongoDB installation. Everything works fine when I run without replication but when I run mongod with the --replSet option, and run rs.initiate(), ...
6
votes
1answer
2k views

Mongo cannot find my collection

My mongodb server has a database named villageContents It has a collection named tablebusiness If I run mongo I saw MongoDB shell version: 2.0.7 connecting to: test > I wonder what "test" is. ...
2
votes
1answer
511 views

How to add spatial indexes through rockmongo

In rockmongo we got fields for the field name and whether we should sort by ascending or descending. How to add spatial indexes then?
4
votes
2answers
5k views

How can I time-stamp data in MongoDB?

I'm responsible for writing an app to juggle a huge amount of client and business intelligence information. This information involves records for various businesses and metrics like revenue, their web ...
4
votes
1answer
320 views

Ideal environment and cost for running a medium size MongoDb server

I know some people will say this question does not belong here but i didnt find a better place on the internet to ask this. Please migrate to an appropriate place if you think it should be. I am using ...
4
votes
1answer
589 views

MongoDB optimization on high data

I have a mongoDB collection with 42M registers with 1M new registers every day. We found a low performance on mongoDB querying. showing in mongostat the fields: qr|qw ar|aw with values of 300-500. ...
3
votes
1answer
935 views

MongoDB - handling embedded documents and relations

I am researching MongoDB for a web app that I am bulding. Coming from a MySQL background, the concept of embedded documents is not so easy to fully understand. Let's say I have a document called ...
0
votes
1answer
76 views

MongoDB: Can I perform a second query if the first doesn't match

When querying MongoDB is it possible to perform a query and if it isn't matched perform a second query. I could perform an $or which will do booth queries and return the results for booth but I only ...
1
vote
1answer
416 views

mongodb: replica-set processing reads on the primary

Running a replica-set with 1 primary and 2 secondaries, I wonder why the READs are also done on the primary. Shouldn't the primary mainly do the WRITEs and the secondary can share the READ-load?! I ...
1
vote
1answer
78 views

How can I automate sharding in the presence of continuous reads

I am using a pymongo in a sharded mongo environment. I have some fairly write-intensive systems, so I split the data up by time, with one database per hour, so the heavy-lifting of index-updates can ...
2
votes
1answer
3k views

mongodb: drop all collections

How to remove existing content before entering a replicaset the first time? mongodb worries about: ... has data already, cannot initiate set. All members except initiator must be empty.
3
votes
1answer
179 views

Does mongodb automatically move small non-partitoned databases to spread read load?

I have a few hundred small databases, each between 0.2GB and 4.0GB in size. These are sitting on a sharded mongodb environment with 10 or so shards. At any one time, only a very small subset of these ...
7
votes
2answers
2k views

mongodb: replica-set with load balancer

Is there an option for load balancing with mongodb replica sets? I am not asking for a HAProxy or similar, but for a built-in feature from mongodb. Could not find tips for this in the docs.
1
vote
1answer
118 views

Storing all data in a single db versus multiple dbs in Mongodb

We have an app that is basically an ERP. Some of the resources in the ERP are satellite tracked. So the information related to the resource itself is minimal, but the satellite tracker produces data ...
0
votes
1answer
175 views

What database do most mobile start ups use? [closed]

mongodb? MySQL? PostgreSQL? If someone would add pluses and minus, let me know. Why I ask: I am a mobile startup. I need a database that supports spatial indexes. The spatial index must be able to ...
4
votes
2answers
807 views

MongoDB: Replica Set - master vs. slave

We think about moving from a master-slaves to mongodb with replica-set. Now I wonder if mongodb replicas are also set up like read-only slaves or if each mongos is able to write and sync the others ...
5
votes
1answer
319 views

MongoDB deployment best practices

I had a few questions around deployment best practices and how folks are using mongodb today. Feel free to add any other comments you can think off. No of databases per mongod instance. Is the ...
6
votes
2answers
3k views

MongoDB: RAM requirements

Is it enough to have the entire index in memory/ram or does mongodb even try to allocate as much ram as possible to store even the data for fast reads? I'd like to run mongodb + other applications ...
3
votes
1answer
531 views

MongoDB: queue vs. realtime write/update

On a large mongoDB I have 2 different use-cases for reading and 2 different types for write/update. read 1: find by index -> no question on this. this works like a charm - as long as the index fits ...
7
votes
3answers
3k views

Upstart script in ubuntu for mongodb

I am new to linux and mongodb. I've already installed mongodb on ubuntu but I want to run one more instance on different port. As I understood from other questions and forums , there must be upstart ...
6
votes
1answer
374 views

what is mongodb telling me when it logs an update?

After several minutes of a large program that pushes a lot of data into mongo, my log starts to show a message for (I guess) each update. This seems awfully noisy, is there some special reason it ...
3
votes
1answer
451 views

Could a large log file be the reason cron job keeps dying?

The log is 15 Gigabytes. I guess I have to back it up and delete. I have enough hard disc space, but did not realize log was so large. And overnight cron jobs suddenly started to die in the middle.
1
vote
1answer
124 views

Where do caching servers conceptually fit in my architecture?

Given the simple well-known architecture below: Where (conceptually) does the caching server(s) sit?
8
votes
2answers
2k views

MongoDB Replica Set SECONDARY Stuck in `ROLLBACK` State

During a recent automated update of our mongodb PRIMARY, when the PRIMARY stepped down it permanently went into a ROLLBACK state. After several hours in the ROLLBACK state, there was still no ...
-1
votes
2answers
252 views

MongoDB replication to one machine

Does MonogDB supports replication where I have many machines with MongoDB that have different data and I want to replicate this data to one, and only one MongoDB?
5
votes
1answer
1k views

Mongo Collection `Size` is *larger* than `storageSize`?

I recently compacted my collection using the command: db.<collectionName>.runCommand( "compact" ) And now my collection size seems to be bigger than size on disk! SECONDARY> ...
1
vote
1answer
78 views

Transfering data from one MongoDB server to another while eliminating users/authentication

I am transferring MongoDB databases from one server to another. The servers cannot talk to each other, so I must use mongodump/mongorestore. The 'from' server used authentication for the databases. ...
6
votes
1answer
1k views

What factors contribute to lock-percentage with MongoDB

We're attempting to better optimize how we're using our MongoDB instance. We seem to be routinely getting high lock-percentages, and are looking to help minimize that. Here is some mongostat output: ...
3
votes
1answer
116 views

MongoDB: Should I combine fields for performance in limited circumstances

I have a really simple MongoDB collection: { "user": 1, "domain": "example.com", "apiAccess": true } There's an index on the "user" and "domain" fields. I always perform the same type of ...
4
votes
1answer
344 views

MongoDB working set size on capped collection larger than capped collection size?

On my database server right now I have 16GB of ram and an 8GB capped collection with about 4GB of indexes. So I may understand this wrong but shouldn't this only ever use around 12GB of my RAM or ...