Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

MongoDB C100DBA Exam - Topic 1 Question 75 Discussion

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.
B) As an indexed query using 'mylndex' because field 'user.login' is indexed
A) As an optimized sort query (scanAndOrder = false) using 'mylndex' because we are sorting on an indexed field
C) MongoDB will need to do a table/collection scan to find matching documents
D) None of the above
E) As a covered query using 'mylndex' because we are filtering out '_id' and only returning 'user.login'

MongoDB C100DBA Exam - Topic 1 Question 75 Discussion

Actual exam question for MongoDB's C100DBA exam
Question #: 75
Topic #: 1
[All C100DBA Questions]

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.

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters
Barb
7 months ago
D is definitely wrong, at least B and A are valid.
upvoted 0 times
...
Charlena
8 months ago
Wait, how can it be a covered query if '_id' is excluded?
upvoted 0 times
...
Gerald
8 months ago
C seems off, I don't think it needs a full scan.
upvoted 0 times
...
Donette
8 months ago
Totally agree with B, the login field is indexed!
upvoted 0 times
...
Lettie
8 months ago
A is correct, it uses the index for sorting.
upvoted 0 times
...
Lazaro
9 months ago
I'm leaning towards option E since it mentions a covered query, but I can't recall if filtering out '_id' really makes it covered in this scenario.
upvoted 0 times
...
Adell
9 months ago
I feel like I saw a similar question where MongoDB had to do a collection scan when the query didn't match the index properly. So maybe option C could be true?
upvoted 0 times
...
Nobuko
9 months ago
I think option B sounds right because 'user.login' is indexed, but I'm not completely confident about how the regex affects that.
upvoted 0 times
...
Jina
9 months ago
I remember that for a query to be optimized, it needs to use an index on both the filter and sort fields, but I'm not sure if that's the case here.
upvoted 0 times
...
Alaine
9 months ago
This seems like a classic case of using an index to efficiently execute a query. The combination of the indexed fields and the sorting should allow MongoDB to use the index to retrieve the results in the correct order.
upvoted 0 times
...
Buck
9 months ago
I'm a bit confused about the "scanAndOrder = false" part. Does that mean the sort will be done in memory without a full table scan? I'll need to review my MongoDB query optimization knowledge for this one.
upvoted 0 times
...
Boris
9 months ago
Okay, let me think this through step-by-step. The query is filtering on "user.login" which is indexed, so that's good. And it's sorting on "user.date" which is also indexed, so that should allow an optimized sort.
upvoted 0 times
...
Lili
9 months ago
Hmm, the index includes both "user.login" and "user.date", so I'm thinking it might use that index for the query. But I'm not sure if it will be a full index scan or an optimized sort.
upvoted 0 times
...
Jose
9 months ago
This looks like a tricky MongoDB query question. I'll need to carefully analyze the index and query details to determine the most likely execution plan.
upvoted 0 times
...
Tijuana
9 months ago
This is a good question to test our understanding of digitization in manufacturing. I think the key is to focus on the core outcomes, rather than peripheral benefits. I'll review the options and choose the one that seems most fundamental.
upvoted 0 times
...
Alisha
9 months ago
Based on my understanding, the correct answer is B. The evidence report is designed to provide a comprehensive view of all the evidence items in a case.
upvoted 0 times
...
Madalyn
9 months ago
This seems like a straightforward question. The developer needs a full GPU dedicated to the machine-learning training, so I'd go with option C - Passthrough GPU.
upvoted 0 times
...
Jacinta
10 months ago
The instructions seem pretty detailed, but I want to make sure I understand the difference between the various data validation options. I'll take my time and double-check each step.
upvoted 0 times
...

Save Cancel