Skip to content

Commit d39a03b

Browse files
authored
added a comment on query plan caching. (Azure#24091)
1 parent 3b57be8 commit d39a03b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sdk/cosmos/azure-spring-data-cosmos/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,9 @@ public interface UserRepository extends CosmosRepository<User, String> {
294294

295295
- `findByFirstName` method is custom query method, it will find items per firstName.
296296

297+
#### Query Plan Caching
298+
When query plan caching is enabled, custom query methods like `findByFirstName(String firstName)` where `firstName` is the partition key will result in lower query execution time. Query plan caching can be enabled by setting the `COSMOS.QUERYPLAN_CACHING_ENABLED` System property to 'true'. Currently, query plan caching is only supported for custom query methods targeting a single partition.
299+
297300
#### QueryAnnotation : Using annotated queries in repositories
298301
Azure spring data cosmos supports specifying annotated queries in the repositories using `@Query`.
299302
- Examples for annotated queries in synchronous CosmosRepository:

0 commit comments

Comments
 (0)