MongoDB Certified DBA Associate Exam (Based on MongoDB 4.4) - C100DBA 模擬練習
A MongoDB collection named users contains sample documents with fields including name, age, address, description, city, and occupation.
The administrator uses the following query to perform a collection scan:
db.users.find({ city: " New York " , occupation: " Software Engineer " }) What compound index will improve the performance of the query the MOST?
The administrator uses the following query to perform a collection scan:
db.users.find({ city: " New York " , occupation: " Software Engineer " }) What compound index will improve the performance of the query the MOST?
正解: A,D
解説: (PassTest メンバーにのみ表示されます)
As per the aggregation pipeline optimization concepts, if you have a $sort followed by a $match:
正解: D
In a sharded replica set environment, the w Option provides ability for write concern and j Option provides ability for the data to be written on disk journal. Consider that we have a seven member replica set and we want to assure that the writes are committed to journal. What should be the value of j?
正解: A
Consider the following example document:
{
" _id " : Objectld( " 5360c0a0a655a60674680bbe " ),
" user "
" login " : " irOn "
" description " : " Made of steel "
" date " : ISODate( " 2014-04-30T09:16:45.836Z " ),
}
>
and index creation command:
db.users.createlndex( { " user.login " : 1, " user.date " : -1 }, " mylndex " ) When performing the following query:
db.users.find( { " user.login " : /Air.*/ },
{ " user " :1, " _id " :0 > ).sort( { " user.date " :1 > )
which of the following statements correctly describe how MongoDB will handle the query? Check all that apply.
{
" _id " : Objectld( " 5360c0a0a655a60674680bbe " ),
" user "
" login " : " irOn "
" description " : " Made of steel "
" date " : ISODate( " 2014-04-30T09:16:45.836Z " ),
}
>
and index creation command:
db.users.createlndex( { " user.login " : 1, " user.date " : -1 }, " mylndex " ) When performing the following query:
db.users.find( { " user.login " : /Air.*/ },
{ " user " :1, " _id " :0 > ).sort( { " user.date " :1 > )
which of the following statements correctly describe how MongoDB will handle the query? Check all that apply.
正解: E
Which TWO methods should an administrator use to create a backup of a MongoDB replica set?
正解: A,E
解説: (PassTest メンバーにのみ表示されます)
A department store maintains a clothing collection:
{ " _id " : 1, " item " : " sweater " , " sizes " : [ " XS " , " S " , " L " ] }
{ " _id " : 2, " item " : " t-shirt " , " sizes " : [ " S " , " M " , " L " ] }
{ " _id " : 3, " item " : " vest " , " sizes " : [ " M " , " L " , " XL " , " XXL " ] } An employee runs:
db.clothing.find( { " sizes " : " M " } )
Which index should improve performance for this query the MOST?
{ " _id " : 1, " item " : " sweater " , " sizes " : [ " XS " , " S " , " L " ] }
{ " _id " : 2, " item " : " t-shirt " , " sizes " : [ " S " , " M " , " L " ] }
{ " _id " : 3, " item " : " vest " , " sizes " : [ " M " , " L " , " XL " , " XXL " ] } An employee runs:
db.clothing.find( { " sizes " : " M " } )
Which index should improve performance for this query the MOST?
正解: B
解説: (PassTest メンバーにのみ表示されます)
What command lists all indexes for a collection?
正解: D
解説: (PassTest メンバーにのみ表示されます)
What is the defau size of a GridFS chunk?
正解: B
What command set removes node-1.cluster1.mycompany.local:27017 and node-2.cluster1.mycompany.local:
27017 from the replica set, then adds node-1.cluster1.mycompany.local:27017 back to the replica set?
27017 from the replica set, then adds node-1.cluster1.mycompany.local:27017 back to the replica set?
正解: B
解説: (PassTest メンバーにのみ表示されます)
Which node in a replica set does accept write operation?
正解: A
If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?
正解: B