Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> how to do a "non-blocking" INSERT?

how to do a "non-blocking" INSERT?

From: <nico_at_arzoon.com>
Date: Fri, 10 Dec 1999 04:37:26 GMT
Message-ID: <82q026$6dv$1@nnrp1.deja.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US