Are Salesforce ObjectIds (15/18 char) guaranteed to be sequential, based on create date?
In other words, would the following queries return the same sequence of items?:
1. Select Id from Account Order by Id
2. Select Id from Account Order by CreateDate
I am going to be retrieving large numbers of objects using the SOAP API, where (as I understand it), the limit per query is 2,000 records and the limit per transaction is 50,000 records. So I need to have some way of tracking where to start each batch of 50,000 records (within each batch I will be using queryLocator
and queryMore
) and was wondering if I could use a format like:
WHERE Id > {LastIdFromPreviousBatch} ORDER BY Id
Thoughts on this strategy?
queryMore
, there is no limit of 50,000 records. You just keep going through in 2,000 record batches until you get all of the records that are included in the original query?