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 -> Re: Help on integrity constraint issue

Re: Help on integrity constraint issue

From: Morris Luk <morris_luk_at_my-deja.com>
Date: 30 Jan 2002 15:37:44 -0800
Message-ID: <e3ccc19b.0201301537.7b24cf7a@posting.google.com>


Hi Mike:

Thanks for your input. I'm not sure what you're trying to refer to when you said "in this case" in your last sentence. Case 1, Did you mean since there is no answer to which way is better, you just think locking is more efficient? Or Case 2, you tried to say in your delete-insert example, locking is more efficient. Or Case 3, in my insert-insert example, locking is more efficient.

If it's Case 1, since there is no definite answer, please provide more evidences to convince me that your saying is right.

If it's Case 2, locking is the only solution which I won't doubt. But of course, this has not answered my question.

If it's Case 3, why do you still think that returning an error is less efficient than blocking others which could potentially be deadlocking the system?

Also, please further elaborate your use of "efficient". How do you measure it when you say something is more efficient than the others?

I'm not trying to give you hard time but I really want to learn and make sure what Oracle is doing now makes sense to me.

Thanks.

mike2322_at_hotmail.com (Mike Liu) wrote in message news:<2262aa8e.0201300853.552ce36f_at_posting.google.com>...
> morris_luk_at_my-deja.com (Morris Luk) wrote in message news:<e3ccc19b.0201291420.13bf43b8_at_posting.google.com>...
> > Hi Mike:
> >
> > Thanks for your idea. But your delete and insert example is based on
> > the assumption that the row in test1_dept table has been seen in both
> > session 1 and 2 already. In that case, I agree that it should be
> > handled differently. But my test example is different. The row in
> > test1_dept table can only be seen in session 1 alone, not in sesion 2
> > because session 1 has not committed yet. So that's why I think
> > returning an error is more intuitive rather than creating deadlock.
> > Have I made myself clear?
> >
>
> Yes, I understand your points and I agree with you that returning an
> error is more intuitive. Actually it would be more consistent with the
> "multi-version" concept Oracle has been promoting because in this case
> writer IS blocking reader. So I guess the question goes back to the
> old question, "Is multi-version better or locking better?". I don't
> know if there is a correct answer to this. In this case, I think the
> locking is more efficient.
>
> Regards,
> Mike
Received on Wed Jan 30 2002 - 17:37:44 CST

Original text of this message

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