Composite Index Implementation Quiz

5 questions Pass: 70% +25 pts (50 with Pro)

Quiz covering Indexing Strategy

What you'll be asked

  1. Which of the following scenarios is the primary use case for implementing a composite index in Azure Cosmos DB?
  2. You have a query: SELECT * FROM c WHERE c.category = 'electronics' ORDER BY c.price DESC. Which composite index definition is required to optimize this query?
  3. What is the maximum number of properties that can be included in a single composite index in Azure Cosmos DB?
  4. If you define a composite index for properties (A, B), will it also optimize a query that filters only by property A?
  5. You are optimizing a query with multiple ORDER BY clauses: ORDER BY c.lastName ASC, c.firstName DESC. You have a composite index defined as: ({path: '/lastName', order: 'ascending'}, {path: '/firstName', order: 'ascending'}). Will this index be used for the query?

Answers and explanations come after you submit.