Monitoring And Optimization Strategies(Engineering > Computer Science And Engineering > Mongodb ) Questions and Answers
Question 1. Which of the following should is used to check whether collection is capped or not ?
isCAP()
isCapped()
isColl()
None of the mentioned
Explanation:-
Answer: Option B. -> isCapped()
Use the isCapped() method to determine if a collection is capped, as: db.collection.isCapped().
Question 2. ___________ is also used to pre-allocate space for an ordinary collection.
db.createCollection.
db.create
db.createColl
All of the mentioned
Explanation:-
Answer: Option A. -> db.createCollection.
MongoDB creates a collection implicitly when the collection is first referenced in a command.
Question 3. MongoDB stores tag sets in the replica set configuration object, which is the document returned by _____ .
rs.config()
rs.conf()
rs.confstats()
All of the mentioned
Explanation:-
Answer: Option B. -> rs.conf()
Custom read preferences and write concerns evaluate tags sets in different ways.
Question 4. If the indexed field in a document is not a _____ or an array that holds a date value(s), the document will not expire.
fsynconce()
fsync()
sync()
All of the mentioned
Explanation:-
Answer: Option B. -> fsync()
HGFS and Virtual Box's shared folders do not support this operation.
Question 5. If the indexed field in a document is not a _____ or an array that holds a date value(s), the document will not expire.
DATE
TIME
DATETIME
All of the mentioned
Explanation:-
Answer: Option A. -> DATE
Built-in first-in-first-out property maintains the order of events, while managing storage use.
Question 6. If __________ is high relative to uptime, the database has existed in a lock state for a significant amount of time.
globalLock.halfTime
globalLock.totalTime
globalLock.downTime
All of the mentioned
Explanation:-
Answer: Option B. -> globalLock.totalTime
The value of totalTime represents the time, in microseconds, since the database last started and creation of the globalLock.
Question 7. serverStatus includes all fields by default, except _________ .
rangeDeleter
rangeDelete
rangeDEL
None of the mentioned
Explanation:-
Answer: Option B. -> rangeDelete
You may only dynamically include top-level fields from the serverStatus document that are not included by default.
Question 8. Which of the following parameter specifies the verbosity mode for the explain output ?
verbosity
verbose
queryPlanner
None of the mentioned
Explanation:-
Answer: Option B. -> verbose
The mode affects the behavior of explain() and determines the amount of information to return.
Question 9. The _________ field provides the amount of resident memory in use.
mem.resident
memory.resident
mem.resident
All of the mentioned
Explanation:-
Answer: Option C. -> mem.resident
If this exceeds the amount of system memory and there is a significant amount of data on disk that isn't in RAM, you may have exceeded the capacity of your system.
Question 10. The ________ command returns information regarding the number of open connections
connPoolStats
connStats
serverstats
None of the mentioned
Explanation:-
Answer: Option A. -> connPoolStats
To avoid overloading the connection resources of a single mongod or mongos instance, ensure that clients maintain reasonable connection pool sizes.