Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Double check and locking or conditional insert and multi-threading

Denis Kishenko-OracleJan 14 2013 — edited Jan 16 2013
Hi all

I have plsql procedure which executes conditional insert like

if <table A doesn't contain row R> then
insert <row R into table A>
end if;

but simultaneous calls do multiple inserts sometimes. In other programming languages problem can be fixed with [double check and lock|http://wikipedia.org/wiki/Double_checked_locking] but plsql has no "synchronized" block.

Thoughts?

Edited by: Denis Kishenko on Jan 14, 2013 12:48 AM

Edited by: Denis Kishenko on Jan 14, 2013 12:52 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2013
Added on Jan 14 2013
52 comments
4,595 views