You perform the following operation in the shell: db.foo.insert( { } ); What gets inserted?
If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?
What is the replication factor for a replicated cluster with 1 primary, 3 secondaries with one of them hidden. The set also has an arbiter?
Which operations add new documents to a collection?
The difference between $push and $addToSet is:
A collection named products contains the following documents:
{ " _id " : 1, " name " : " Laptop " , " price " : 1500 }
{ " _id " : 2, " name " : " Smartphone " , " price " : 800 }
{ " _id " : 3, " name " : " Tablet " , " price " : 600 }
{ " _id " : 4, " name " : " Monitor " , " price " : 300 }
{ " _id " : 5, " name " : " Headphones " , " price " : 200 }
Given the following query:
db.products.find().sort({ " price " : -1 }).limit(2)
What is the expected output?
In which of the following scenarios is sharding not the correct option. Select all that apply.
A user stores movie data in a collection called movies. The collection contains thousands of documents.
A sample document looks like this:
{ " title " : " Titanic " , " year " : 1997, " rating " : 8.6 }
The user runs the following query to sort movies first by year, and then by rating:
db.movies.find().sort({ " year " : 1, " rating " : -1 })
Which index would improve the query ' s performance the MOST?
What command returns all documents in an orders collection where quantity is less than or equal to 1000 and salesRep is not equal to " Anne " ?
Below is a sample document of " orders " collection