Re: Tuning 'Alter Modify" column

From: Jonathan Lewis <jlewisoracle_at_gmail.com>
Date: Thu, 25 Aug 2022 12:00:22 +0100
Message-ID: <CAGtsp8nsmrAF_XnzrCsK6QhXu-groCzBhZSHMrb10CasUxz2Yg_at_mail.gmail.com>



On Thu, 25 Aug 2022 at 11:12, yudhi s <learnerdatabase99_at_gmail.com> wrote:

> Yes, there are triggers for before each row insert/update/delete and it's
> doing some operation like perform count from some other table etc...there
> for those update trigger. But as it's an Alter query but internally Oracle
> doing update, so does the trigger will come into picture here?
>
>
That's not a safe question to ask - whatever answer you get it may be wrong unless it's actually in the documentation with all possible variations covered.
No matter how many tests someone has done with triggers and alter table etc. they may not have covered exactly your circumstances.

Arguably a potentially relevant update trigger HAS to fire - what if you had a trigger which said "if substr(c1,-3) = ' three spaces}' then ..." Your alter table would make some of the results of any previous firing of that trigger potentially wrong. On the other hand if your update trigger had a declaration like:

create or replace trigger t1_bru
before update of c2
on t1
for each row
...

then it would not have to fire if your alter table command was modifying c1.

The only safe option is for you to examine your triggers in great detail to see what they would do for an update to the critical column.

Regards
Jonathan Lewis

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Aug 25 2022 - 13:00:22 CEST

Original text of this message