Forum Discussion

nitinrahim's avatar
nitinrahim
Brass Contributor
Mar 19, 2024

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

 

Resources