DBS-C01 · Question #287
A company is using Amazon DocumentDB (with MongoDB compatibility) to manage its complex documents. Users report that an Amazon DocumentDB cluster takes a long time to return query results. A…
The correct answer is C. MongoDB explain() method. If a query runs slow, it could be because the query execution requires a full scan of the collection to choose the relevant documents. Sometimes creating appropriate indexes enables the query to run faster. To detect this scenario and decide the fields on which to create the…
Question
A company is using Amazon DocumentDB (with MongoDB compatibility) to manage its complex documents. Users report that an Amazon DocumentDB cluster takes a long time to return query results. A database specialist must investigate and resolve this issue. Which of the following can the database specialist use to investigate the query plan and analyze the query performance?
Options
- AAWS X-Ray deep linking
- BAmazon CloudWatch Logs Insights
- CMongoDB explain() method
- DAWS CloudTrail with a custom filter
How the community answered
(25 responses)- A4% (1)
- B4% (1)
- C92% (23)
Explanation
If a query runs slow, it could be because the query execution requires a full scan of the collection to choose the relevant documents. Sometimes creating appropriate indexes enables the query to run faster. To detect this scenario and decide the fields on which to create the indexes, use the explain command. https://docs.aws.amazon.com/documentdb/latest/developerguide/user_diagnostics.html#user_dia gnostics-query_plan
Topics
Community Discussion
No community discussion yet for this question.