top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

In MongoDB db.stats() slow, should I be worried to execute?

+1 vote
257 views

I want to list the size of the different database and trying the function:

db.stats()

But, my developer team is worried over that this might have a huge impact of the system. Should I be worried?

How does this function detect the statistic information such as the size of the different databases. Or is it a better way to detect the size of the database that I can use, which has little or no performance impact ..

posted Feb 28, 2017 by anonymous

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
I have tried this will no ill-effects. I would imagine it reads pre-calculated stats rather than generating them on demand.

Similar Questions
+2 votes

From Mongodb client, we can use db.Collection.stats() to get status of collections, such as:

+ Number of records (count) 
+ Size on disk (storageSize) 
+ Indexes (indexSizes) 
+ Average object size (avgObjSize) 

Now I want to monitor these data from web backend with Mongodb java driver, please let me know how to get them?
I've referred: http://mongodb.github.io/mongo-java-driver/3.0/driver-async/getting-started/quick-tour-admin/ but it's not enough information for me. Any pointer?

0 votes

We all know that mongoDB provide different type of indexing (ascending, descending, geo2D, geo2d sphere, or text), so which type of indexing considered more efficient for indexing boolean field?

...