As per the aggregation pipeline optimization concepts, if you have a $sort followed by a $match:
Suggested Answer: D
Get Premium C100DBA Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
11 comments · newest first
TR
Truman
11 months ago
Just to clarify, $match is more efficient before $sort, right?
NA
Nathalie
12 months ago
I thought $sort always had to be first, interesting!
ME
Melvin
12 months ago
Wait, are you saying MongoDB doesn't rearrange those by default?
KA
Kanisha
12 months ago
I disagree, the order shouldn't matter that much.
BE
Bethanie
1 year ago
$match should definitely come before $sort for better performance.
RU
Ruth
1 year ago
I believe $sort moves before $match, but I need to double-check if that's the best practice for optimization.
JE
Jennifer
1 year ago
I’m a bit confused; I thought MongoDB always executed operations in the order they are written, but maybe there are exceptions?
PU
Pura
1 year ago
I practiced a similar question, and I feel like $match should come before $sort to reduce the dataset size first.
ST
Stanford
1 year ago
I think I remember that the order of $sort and $match can actually affect performance, but I'm not sure which one should come first.
LE
Leonor
1 year ago
This question seems straightforward, but I want to make sure I understand the requirements fully before answering.
TH
Theodora
1 year ago
I've got a good feeling about this one. The Service Catalogue plus the business criticality information is exactly what I would need to do a thorough risk analysis. I'm confident I can nail this question.