Yeah, you're right, on both counts. I only checked the plan and saw a
monster full table scan of 8G rows, without examining the SQL itself in
detail. That being an update, I assumed that there is a condition on the
table. Assumption is the mother of all foul-ups. Without a condition on
the GTT that should indeed be a MERGE or INSERT. Index wouldn't help.
On 5/3/21 3:50 AM, Lothar Flatz wrote:
This update Statement should be rewritten into a merge statement. You would not want to index GTT_TAB, There is not even a filter criteria on that table.