Amazon DBS-C01 Exam: DocumentDB Cluster Query Performance Improvement Tips

DocumentDB Cluster Query Performance Improvement

Question

An application team complains that the DocumentDB cluster takes a long time to return query results.

What actions can be performed to solve this issue (Select TWO)?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

Answer: C and D.

Option A is incorrect because setting the “tls” parameter to “disabled” turns off transport layer security (TLS) for client connections.

This would not speed up query results, but would decrease the security of the database.

Option B is incorrect because setting “primaryPreferred” read preference routes read operations to the primary instance.

This would not increase the efficiency of query.

It may decrease the performance of the cluster since all requests would be going to the primary instance.

Option C is CORRECT because setting the “secondaryPreferred” read preference option distributes requests to read replicas.

This is recommended as it increases the performance efficiency of the database cluster.

Option D is CORRECT because creating an index on the field being queried speeds up the query operations.

Option E is incorrect because db.r4.large is the smallest instance class for DocumentDB instances.

Reference:

https://docs.aws.amazon.com/documentdb/latest/developerguide/user_diagnostics.html#user_diagnostics-identify_unused_indexes https://docs.aws.amazon.com/documentdb/latest/developerguide/how-it-works.html#durability-consistency-isolation

The issue of slow query results in an Amazon DocumentDB cluster can be addressed by taking the following actions:

  1. Create an index on the field being queried: Creating an index on the field being queried can improve the performance of the query by allowing DocumentDB to search the index instead of scanning the entire collection. By doing so, it reduces the amount of data that needs to be processed, and thus, improves the query response time.

  2. Configure MongoDB cluster with "secondaryPreferred": Configuring the MongoDB cluster with "secondaryPreferred" will direct read operations to secondary replicas, which can help to distribute the read load and improve query response time. It will also reduce the possibility of the primary replica becoming a performance bottleneck.

Therefore, options D and C are the correct answers to the question.

Option A ("set 'tls' parameter to 'disabled'") is not a valid solution to this issue because it disables Transport Layer Security (TLS) encryption, which can potentially expose data to security risks.

Option B ("configure MongoDB cluster with 'primaryPreferred'") may not be the optimal solution to this issue because it directs read operations to the primary replica, which can increase the read load on the primary replica and potentially degrade the overall cluster performance.

Option E ("set the instance class to db.r4.large") may not be the best solution because it only increases the compute capacity of the instance and does not address the underlying issue of slow query results.