Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to avoid waiting for locks during delete
"André Hartmann" <andrehartmann_at_hotmail.com> wrote:
> What I am sort of unhappy with is that in some circumstances (SELECT ..
> FOR UPDATE NOWAIT) Oracle is able to tell you when there is a LOCK and
> prevent you from waiting for an uncertain amount of time but instead
> returning an error message... and in some other circumstances (cascading
> delete) Oracle does NOT tell you that but you are stuck with a wait, which
> is nasty.
Point understood André. However, why is it nasty?
If you know that the data is locked with the DELETE/INSERT/UPDATE, how will this make it better? You cannot force the transaction through. All you can do is tell the user "sorry, no go - try again". How is that better than having to wait?
Is the problem here not rather _how_ users use the system and/or how the front-end is coded? What do you do in the case of a user causing a lock for 1 hours, 5 hours or even 10 hours?
No amount of NOWAIT and "sorry - please retry" will solve the problem of users locking data for hours on an end.
-- BillyReceived on Wed Aug 13 2003 - 00:05:59 CDT