C100DBA · Question #9
Which command is used to determine storage capacity of specific database?
The correct answer is B. dbstats. db.stats() (the dbstats command) returns detailed statistics about a specific database, including storage size, data size, number of collections, and index sizes - making it the correct tool for assessing storage capacity at the database level. Why the distractors are wrong: A…
Question
Which command is used to determine storage capacity of specific database?
Options
- Amongotop
- Bdbstats
- Cmongostat
- Dconstats
How the community answered
(30 responses)- A3% (1)
- B87% (26)
- C7% (2)
- D3% (1)
Explanation
db.stats() (the dbstats command) returns detailed statistics about a specific database, including storage size, data size, number of collections, and index sizes - making it the correct tool for assessing storage capacity at the database level.
Why the distractors are wrong:
- A. mongotop - tracks read/write activity (time spent per collection), not storage capacity.
- C. mongostat - provides a real-time snapshot of a running
mongodinstance's throughput and operations, not database-level storage details. - D. constats - not a valid MongoDB command.
Memory tip: Think "dbstats = dbatabase statistics" - it's scoped to a single database and tells you how much space that database is consuming, just like checking the size of a specific folder on your hard drive.
Topics
Community Discussion
No community discussion yet for this question.