How can you reduce read latency for the retail store solution? Select two complete solutions.
Choose an answer
Tap an option to check your answer.
Correct answer: Add a composite index for the store-location queries in Azure Cosmos DB, revise the queries to use parameterized SQL, and update the Azure Function to call those queries., Provision an Azure Cosmos DB dedicated gateway and change the Azure Function app connection string to point to the dedicated gateway endpoint..
Why this is the answer
Adding a composite index for store-location queries in Azure Cosmos DB, revising queries to use parameterized SQL, and updating the Azure Function to call these queries directly addresses read latency. Indexes significantly speed up data retrieval for common query patterns, and parameterized SQL prevents query compilation overhead, both reducing the time taken to fetch data. Provisioning an Azure Cosmos DB dedicated gateway and changing the Azure Function app connection string to point to it also reduces read latency. A dedicated gateway improves performance by providing a direct, isolated connection to your Cosmos DB account, bypassing the shared gateway and reducing network hops and contention. Setting consistency to session with Redis caching, while useful for specific consistency models, doesn't primarily target general read latency reduction in the same direct way as indexing or a dedicated gateway. Reconfiguring blob storage with a Cosmos DB gateway is irrelevant as blob storage is a separate service. Changing consistency to strong increases latency due to stricter synchronization requirements, and while increasing RU/s improves throughput, it doesn't inherently reduce the latency of individual reads as effectively as indexing or a dedicated gateway.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed