title: CosmosDB with SQL API - incremental order of the "_rid" field
body: <p>I am using cosmos DB with my spring boot application, and looking for a way to assign sequential id for every new entry into the collection. </p>
  
  <p>There's a similar query here , which suggests the use of "_rid":
  <a href="https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/38106916-new-cosmosdb-sql-api-built-in-function-newid-b" rel="nofollow noreferrer">https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/38106916-new-cosmosdb-sql-api-built-in-function-newid-b</a></p>
  
  <p>I also observed that when i added new items in a particular collection, every item has the following _rids :-</p>
  
  <p>"_rid": "qslAAL+OyU8<strong>D</strong>AAAAAAAAAA==" </p>
  
  <p>"_rid": "qslAAL+OyU8<strong>E</strong>AAAAAAAAAA=="</p>
  
  <p>"_rid": "qslAAL+OyU8<strong>F</strong>AAAAAAAAAA=="</p>
  
  <p>And the above pattern goes on for every item in the order of insertion. I have tested this only for a few records though.</p>
  
  <p>I am unable to find any documentation on this, as to what happens if there are a lot many more records , in the order of thousands ?!</p>
  
  <p>If any kind soul could explain the mechanism/pattern behind this / point to some documentation then that would be really helpful !!</p>
  
  <p>Thanks!</p>
  
  <p>EDIT 1: Adding use case details :-
  Maintaining a record of entries in order of insertion. Every entry gets an integer number as it's sequence number. This sequence for me is important. A new record can 'override' the old record using the sequence number and that's the reason i need the unique id.  I cannot use Guid or uuid because i need to display the number on UI, and that's how the user will know which record to override. </p>