Azure Cosmos DB
An Azure NoSQL database service for app development.
1,439 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a query below.
SELECT *
FROM c
WHERE
c.partition = "partition" AND
c.date BETWEEN "2020-01-01T00:00:00.000Z" AND "2020-12-31T23:59:59.999Z" AND
ARRAY_CONTAINS(["group_a", "group_b"], c.groups) AND
CONTAINS(c.name, "name", true) AND
c.deleted = null
ORDER BY
c.sequence DESC
I'd like to add composite indexes for this query.
What index is best for it?
Please go through the considerations for the range and order by part of the query. Specifically if you are using the multiple range queries or system functions, it should be the last part of the index and only one of these used in single index.
Please check and get back to us with questions.
Regards
Navtej S