Re: 10g: parallel DML trigger race conditions?
Date: Wed, 16 Feb 2011 05:08:44 -0800 (PST)
On Feb 16, 7:34 am, Frank Bergemann <FBergem..._at_web.de> wrote:
> are triggers executed in parallel for parallel DML?
> What happens, if the same record is updated _twice_ in a bulk update?
> Something like this:
> forall i reloads.first..reloads.last
> update account set money = money + reloads(i).amount where
> account.id = reloads.acct_id;
> Can it happen, that two "trigger before insert or update on account
> for each row" are executing in parallel for the same record?
> - if acct_id = X is there multiple times in table reloads.
> So they will find the same :old conditions.
> Or does oracle take care for sequential execution of trigger for same
> - thanks!
Not directly answering your question but FORALL is not performing parallel DML, it is merely doing a bulk operation that minimizes the overhead of single row operations. I'm not aware of it being able to run in parallel DML mode.
Oracle related stuff blog:
Co-author of the "OakTable Expert Oracle Practices" book: http://www.apress.com/book/view/1430226684 http://www.amazon.com/Expert-Oracle-Practices-Database-Administration/dp/1430226684 Received on Wed Feb 16 2011 - 07:08:44 CST