How can we improve Azure Cosmos DB?

Execute read-only stored procedures on secondary replica

I have a many-to-many scenario close to the post below:
https://feedback.azure.com/forums/263030-documentdb/suggestions/6611247-support-cross-document-joins
I have multiple entities, and the relationships between them are saved as documents and can't be denormalized.
Instead of doing multiple queries against the DB, I'd like to wrap it in a stored procedure to save round-trip time.
However, current stored procedures can only execute on primary replica, so it would be slow if the users are from another region.
Is that possible to define some read-only stored procedures so that it can be executed in read regions?

27 votes
Vote
Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
You have left! (?) (thinking…)
Fengyang shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base