database performance - Is it possible to run queries on 200GB data on mongodb with 16GB RAM? -


i trying run simple query find number of records particular value using:

db.colname.find({id_c:1201}).count()

i have 200gb of data. when run query, mongodb takes ram , system starts lagging. after hour of futile waiting, give without getting results.

what can issue here , how can solve it?

i believe right approach in nosql world isn't trying perform full query that, accumulate stats overtime.

for example, should have collection stats arbitrary objects should own kind or id property can take value "totalusercount". whenever add user, update count.

this way you'll instant results. it's getting property value in small collection of stats.

btw, slowness should originated querying objects non-indexed property in collection. try index id_c , you'll quicker results.


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -