I am retrieving records that have been updated/deleted after every backup, i.e. Incremental backup procedure. There are different options to pursue with this:
- Bulk - Cannot support all the objects thus have to resort to SOAP. Does this support retrieving deleted records, i.e.
- SOAP - Probably the best bet to use the calls using
getDeleted(). However, these calls return only the relevant info such as ID, audit fields. I have to fetch the rows from my backup to scan the particular records.
- SOAP v2 - Use queryAll(); Query =
"Select ... from ObjName where isDeleted=true or (Datefield > ... and Datefield < ...)". Datefield as some may not necessarily contain all the fields. The order for query is
SystemModStamp, ModifiedDate, CreatedDate.
I am tied between the options 2 and 3. Since the backup is stored as a file, I have to perform sequential file scans to retrieve the related record information. My backup size is small and therefore both the approaches did not have much difference in execution time. However, I am not sure whether to go for approach 3 as it may incur query limits.
- Are there any problems with writing custom queries as opposed to using the SOAP predefined calls?
- Will going for approach 3 be slower when compared with approach 2 in overall execution time?
- How will the approach 2 and 3 differ in query execution limits?
- Finally, what other assumptions that I have to consider the incremental query? Example, incremental should be run every 30 days to prevent deletion from recycle bin.