I want to know what is the best way to save records in Sql server table as chain Every record contains the previous record xml Hash and the operation before save takes some time . I case of low traffic every thing works fine but in case of high traffic may be 2 record take the same previous record Id and this is big problem .
I tried save data without order in temp table and then run background job read each record and then add to the correct table one by one but not working correctly I want to know what is the best way to do such tasks ?