Re: Tuning Update query

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Mon, 3 May 2021 10:37:34 -0400
Message-ID: <c6905768-497a-9bdc-5dd8-4dec2955c77a_at_gmail.com>


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.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217
https://dbwhisperer.wordpress.com

--
http://www.freelists.org/webpage/oracle-l
Received on Mon May 03 2021 - 16:37:34 CEST

Original text of this message