MongoDB : Document-Oriented NoSQL Database
2
votes
1answer
60 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() { ...
2
votes
1answer
257 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
219 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 ...
1
vote
1answer
796 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
74 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
93 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
1k 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
78 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
241 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
73 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
53 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
280 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.
...
0
votes
0answers
139 views
Why this query takes 500 seconds to complete even though I got all the compound index right?
I tried this query
db.tablebusiness.find({ "LongitudeLatitude" : { "$nearSphere" : [106.772835, -6.186753], "$maxDistance" : 0.053980478460939611 }, "Prominent" : { "$gte" : 15 }, "indexContents" : { ...
0
votes
1answer
434 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
56 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
163 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
4k 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 ...
2
votes
1answer
480 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
148 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
95 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
144 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 ...
0
votes
0answers
62 views
How can we combine $within and $nearSphere in mongodb
Say I am looking for the nearest location that contain the word seaworld.
I don't want mongodb to "scan" an area too wide.
So I want to limit it
I send
db.tablebusiness.find({ "LongitudeLatitude" ...
3
votes
1answer
1k 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)*cos(-6.186753*0.017453292519943)*cos(Latitude*0.017453292519943)) as ...
0
votes
1answer
169 views
Where can I find manual and tutorial for rockmongo?
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
326 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 ...
1
vote
1answer
665 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
...
1
vote
2answers
340 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(), ...
3
votes
1answer
386 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. ...
1
vote
1answer
258 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
3answers
1k 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 ...
3
votes
1answer
184 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
297 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
489 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
61 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
210 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
56 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 ...
1
vote
1answer
1k 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
88 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 ...
5
votes
2answers
995 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
82 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
131 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 ...
3
votes
2answers
247 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
197 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 ...
4
votes
2answers
822 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
289 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 ...
5
votes
3answers
1k 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 ...
4
votes
1answer
133 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
259 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
112 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
771 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 ...