1

I read in this answer that you can't use

SELECT VALUE COUNT(1)
FROM c

to get the record count for large datasets. Mine is coming back empty: enter image description here

However there are definitely lots of records: enter image description here

How can I get the record count in CosmosDB given a large dataset?

David Klempfner
  • 8,700
  • 20
  • 73
  • 153
  • If your query is too large in either resources used or data to send back it will be split into several responses. The response will contain the necessary info to retrieve the other objects in subsequent requests. I've however never seen this for returning the total count as such a query can use the index and is therefore quite optimized. In the Data Explorer such behaviour is indicated by the `load more` button right above the result which you could click a few times to retrieve the next responses. – NotFound Apr 08 '21 at 08:10
  • There's a "next page" button but it's disabled. – David Klempfner Apr 08 '21 at 22:54
  • I'm not sure but is it possible that this problem resulted from throughput? I mean that maybe the container is too big to calculate the size with a small throughput. – Tiny Wang Apr 09 '21 at 05:58

0 Answers0