Re: Oracle behaving strangely with multiple commands executing in a tight loop
- From: "Frans Bouma [C# MVP]" <perseus.usenetNOSPAM@xxxxxxxxx>
- Date: Wed, 19 Jul 2006 01:19:04 -0700
Steve Eichert wrote:
Oracle uses MVCC, which is a concurrency scheme within a
transaction: if a transaction with DML statements is executed, the
transaction can manipulate data without affecting other threads.
This means that another command issued could be executed in
parallel with the insert and it won't see the inserted data until
that transaction is completed.
On SqlServer, the update statement will block till the insert has
been completed.
Do you execute the insert and update in a single transaction? If
not, could you try to run it in a single transaction?
The issue that we're seeing isn't really a problem with the INSERT
INTO and UPDATE that is executed right after it. At least it doesn't
seem to be. We have a bunch of validations that are doing an INSERT
INTO followed by the update, it appears that they are stepping on one
another which is resulting in data not being inserted and rows not
being updated. Would we have to execute all commands within a single
transaction, or just each individual INSERT INTO/UPDATE combo?
Thanks, Steve
As soon as you don't group statements in 1 transaction, Oracle CAN
(but doesn't have to) schedule the queries to be executed in parallel.
I have no hard evidence that it doesn't happen as well inside a
transaction but it seems unlikely due to the uncommitted data only
reachable from the transaction participating connection.
FB
--
------------------------------------------------------------------------
Lead developer of LLBLGen Pro, the productive O/R mapper for .NET
LLBLGen Pro website: http://www.llblgen.com
My .NET blog: http://weblogs.asp.net/fbouma
Microsoft MVP (C#)
------------------------------------------------------------------------
.
- Follow-Ups:
- Re: Oracle behaving strangely with multiple commands executing in a tight loop
- From: Steve Eichert
- Re: Oracle behaving strangely with multiple commands executing in a tight loop
- References:
- Re: Oracle behaving strangely with multiple commands executing in a tight loop
- From: Steve Eichert
- Re: Oracle behaving strangely with multiple commands executing in a tight loop
- Prev by Date: Re: How to export data from SQL Server to Excel in .net
- Next by Date: Re: Get related rows for a typed datarow
- Previous by thread: Re: Oracle behaving strangely with multiple commands executing in a tight loop
- Next by thread: Re: Oracle behaving strangely with multiple commands executing in a tight loop
- Index(es):
Relevant Pages
|