Q40 Cosmos DB Domain 2 · 25–30% of exam Priority · Real Exam

A query with ORDER BY on two properties fails asking for a composite index. Why?

  1. A Range indexes cover single properties only; multi-property ORDER BY needs a composite index (correct answer)
  2. B Composite indexes are required for all queries
  3. C The container lacks a partition key
  4. D ORDER BY is unsupported

Shortcut: The default policy creates range indexes per path, which serve single-property ordering. Multi-property ORDER BY requires an explicitly defined composite index in the matching order and direction.