Is it possible to execute stored procedure for all partition collection. if not how can i archive without round trips?
Thanks in Advance.
No, sprocs execute in a single partition and there is no automatic fan-out for executing sprocs. You need to specify a partition key when calling them.
Assuming you meant "achieve" rather than "archive", my first suggestion is to design your app and pick your pk so it's available every time you call. Failing that your only other option is to do the fanout manually. You can do this in parallel so the latency is only marginally more than hitting a single partition but it'll consume n-times as many RUs so overall RU throughput limits may constrain you.
The difficulty in doing the fan out yourself is that you don't have control over the number and ranges for your partitions in a partitioned collection. So, you need to retrieve them before doing your fanout. I don't know about the other SDKs, but I haven't seen it directly supported in the node.js SDK. However, the REST API implements an endpoint for doing this, https://{your endpoint domain}.documents.azure.com/dbs/{your collection's uri fragment}/pkranges so you may have to call that directly depending upon your SDK. That will tell you the current ranges of pks for each partition in collection. The min is inclusive so you can use that to make your sproc calls.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With