We had a 300m row table with all rows being updated that took an unexpectantly long time, especially when we aborted the update and a rollback took place (live and learn).
I believe I understand how TD is performing updates, but I would like to review my understanding.
There is a Target table being changed and a Source table containing the update info.
1. The set of rows on the Target table being changed are sent to a spool file and deleted from the Target table.
2. The rows in the spool table rows are modified using the Source table update info.
3. The changed rows in the spool are inserted back into the Target table.
Added questions: If all rows are being changed, are all rows moved to spool and then the final insert into an empty table?
Would it have been better to do a 2 table merge into a 3rd table and then rename it back to the original Target name?
I believe I understand how TD is performing updates, but I would like to review my understanding.
There is a Target table being changed and a Source table containing the update info.
1. The set of rows on the Target table being changed are sent to a spool file and deleted from the Target table.
2. The rows in the spool table rows are modified using the Source table update info.
3. The changed rows in the spool are inserted back into the Target table.
Added questions: If all rows are being changed, are all rows moved to spool and then the final insert into an empty table?
Would it have been better to do a 2 table merge into a 3rd table and then rename it back to the original Target name?