Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> how to do a "non-blocking" INSERT?
I'm trying to figure out how to execute an INSERT statement in such a
way that it would return immediately with an error if it were to block
due to row or table locking. Kind of like the NOWAIT option in the LOCK
TABLE statement.
I have a situation where 2 separate transaction threads are INSERTing rows (which potentially may have identical unique keys) into the same table. the second thread blocks until the first thread commits or rolls back, then its INSERT will either succeed or fail. since the transaction processing time is relatively long, i'd prefer to know in advance that thread 2's INSERT statement will block so I can perform a back off and retry strategy without waiting all that time.
Does anyone know how to something like this?
Thanks in advance...
nico
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Dec 09 1999 - 22:37:26 CST
![]() |
![]() |