On Thu, Nov 17, 2005 at 10:15:30AM -0500, Stephen Frost wrote: > REPLACE/INSERT ON DUPLICATE UPDATE appears to essentially be a > transaction which is supposed to not fail but instead do locking to > ensure that it doesn't fail. This requires predicate locking to be > efficient because you want to tell the concurrent transaction "if you > have the same key as me, just wait a second and you can do an update > 'cause I'm going to create the key if it doesn't exist before I'm done".
Is the requirement for predicate locking, over and above a unique constraint on an index that involves the record key, to deal with the scenario of two inserts executing at the same time, both before commit? Cheers, mark -- [EMAIL PROTECTED] / [EMAIL PROTECTED] / [EMAIL PROTECTED] __________________________ . . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder |\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ | | | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada One ring to rule them all, one ring to find them, one ring to bring them all and in the darkness bind them... http://mark.mielke.cc/ ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match