Lynn Pettis - Tuesday, November 14, 2017 12:00 PM
Yes, that's what I meant. Each row is written once on the table and then basically copied on the nonclustered index (except for the bit column).
The inserts are being done either by batch loads or whenever the system performs an action that affects the data from tables referenced by MainTableID and SomeOtherID. The deletes are being done after the row has been evaluated and assigned to the correct location.
This is not a FIFO, as there are some way to establish precedence based mainly on the MilestoneID. Ideally, everything should be deleted before the next batch load comes which would contain thousands of new rows.