Skip to content

[MEVD] Use ReadItem and partition keys properly with Cosmos NoSQL #13549

@roji

Description

@roji

The provider currently implements GetAsync by placing the document ID (and partition key) in the SQL WHERE clause; this is quite bad for performance and isn't the way Cosmos is meant to be used. Point reads - where a document is fetched via its ID and partition key - are performed via a specialized ReadItem call, which makes the Cosmos SDK directly and efficiently read the document from the right partition.

Also, for non-ReadItem queries that do use SQL, partition keys should not be in the WHERE clause, but rather passed separately to the SDK in the request, against for far more efficient retrieval.

Metadata

Metadata

Assignees

Labels

msft.ext.vectordataRelated to Microsoft.Extensions.VectorData

Projects

Status

Sprint: Done

Relationships

None yet

Development

No branches or pull requests

Issue actions