0
0
MongoDBquery~10 mins

Memory and storage engine basics (WiredTiger) in MongoDB - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to check the current storage engine in MongoDB.

MongoDB
db.serverStatus().storageEngine.[1]
Drag options to blanks, or click blank then click option'
Aversion
Bstatus
Cengine
Dname
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'version' instead of 'name' returns undefined.
Using 'engine' or 'status' are not valid fields here.
2fill in blank
medium

Complete the command to enable the WiredTiger cache size to 2GB in the MongoDB configuration file.

MongoDB
storage:
  wiredTiger:
    engineConfig:
      cacheSizeGB: [1]
Drag options to blanks, or click blank then click option'
A2
B0.5
C4
D1
Attempts:
3 left
💡 Hint
Common Mistakes
Setting cache size too low may reduce performance.
Using strings instead of numbers causes config errors.
3fill in blank
hard

Fix the error in the command to check WiredTiger statistics.

MongoDB
db.serverStatus().wiredTiger.[1]
Drag options to blanks, or click blank then click option'
Acache
Bstats
Cstatus
Dinfo
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'cache' returns only cache info, not full stats.
Using 'status' or 'info' are invalid fields.
4fill in blank
hard

Fill both blanks to create a command that lists all collections using WiredTiger storage engine.

MongoDB
db.getCollectionInfos({storageEngine: [1]: [2])
Drag options to blanks, or click blank then click option'
Aname
B"WiredTiger"
Cengine
D"wiredTiger"
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'engine' or 'WiredTiger' as keys causes no results.
Using uppercase 'WiredTiger' as value is case sensitive and incorrect.
5fill in blank
hard

Fill all three blanks to create a command that sets the WiredTiger journal commit interval to 100 milliseconds.

MongoDB
db.adminCommand({setParameter: 1, [1]: [2], [3]: 100})
Drag options to blanks, or click blank then click option'
AwiredTigerEngineRuntimeConfig
B"journalCompressor"
C"commitIntervalMs"
DjournalCommitInterval
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect parameter names causes command failure.
Not quoting keys properly causes syntax errors.