Forum Discussion
Pagination in Cosmos Db (Maxitemcount or pagesize)
Hi Azure Cosmos Db Team,
Is there an equivalent in Cosmos Db for MaxItemCount parameter( present in dotnet sdk) in JAVA SDK? We wanted to test with MaxItemCount to -1 in JAVA SDK? Where is this exposed? In feed options or Cosmos queryrequestoptions? I see a pagesize parameter in JAVA SDK but we cannot set the same to -1 it seems so that the SDK can optimize the same? We are using SQL API. We are currently using pagesize ==100 for cross partition queries.We are seeing high latency for queries exceeding 2000 results from SDK even though from the portal the RU and latency seems to be less.
https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.documents.client.feedoptions.maxitemcount?view=azure-dotnet
With Regards,
Nitin Rahim
5 Replies
- JillArmourMicrosoft
Community Manager
mannu2050 can you help here? Thank you!- nitinrahimBrass ContributorHI Azure Cosmos Db Team,
Just following up on the above ?
With Regards,
Nitin Rahim- JillArmourMicrosoft
Community Manager
nitinrahim I'm still trying to find someone to help answer this.