I started a new project using node.js and mongodb, and after almost 2 days I collected about 600 thousand objects in MongoDB. I already notice a huge (negative) impact on performance, and I'm starting to worry if I have to move to another database, if I can, or if I have to stick to Mongo and do some (more) optimizations.
Basically I save the following coordinates:
[x1] => 687
[y1] => 167
[x2] => 686
[y2] => 167
[c] => 0
[s] => 0
[m] => 1299430700312
[_id] => MongoId Object (
[$id] => 4d73bd2c82bb5926780001ec
)
No more ... and my queries look like this:
{'$or': [ { x1: {'$gte' : 0, '$lt' : 1000 }, y1: {'$gte' : 0, '$lt' : 1000 } , { x2: {'$gte' : 0, '$lt' : 1000 }, y2: {'$gte' : 0, '$lt' : 1000 } } ] }
: x1, y1, y1, y1, : {x1:1,y1:1},{x2:1,y2:1}.
, ... ~ 40 . 2-8 .
Btw: PHP Out-of-Memory (256 ).
- Intel i7 Intel® R7 Core (TM) 8 8 , ;)
, . , , , .
MySQL ? NoSQL?
, , "2-8secs " - . , 4 10 , .