[FEATURE REQ] Enhance findByIds to Use readMany for Partition Key Optimized Queries or Provide Direct Support for readMany in Spring Data Cosmos SDK #43666
Labels
Client
This issue points to a problem in the data-plane of the library.
Cosmos
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
Workflow: This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Attention
Workflow: This issue is responsible by Azure service team.
In Cosmos DB, the
readMany
API provides a more efficient way to fetch multiple items when theirid
values align with the partition key. However, in the Spring Data Cosmos SDK, thefindByIds
method does not currently leverage this optimisation. SupportingreadMany
infindByIds
or providing explicit support forreadMany
in the SDK would significantly improve performance and reduce RU consumption for such use cases.Proposed Solution:
Enhance
findByIds
:id
parameter matches the partition key.readMany
API internally in such cases to optimise performance.Direct Support for
readMany
:readManyByIds
, in the Spring Data Cosmos SDK to allow developers to explicitly utilize thereadMany
API.Use Case:
id
is also the partition key.Expected Behavior:
id
matches the partition key,findByIds
should leverage thereadMany
API.readManyByIds
method, developers can explicitly specify the usage ofreadMany
.References:
Impact:
The text was updated successfully, but these errors were encountered: