Concurrent reading in oracle?
Say we have customer table which has record
CustId LastName
1 Hamlin
In one request we get the customer last name as Hamlin for custId=1. We update the last name to Kathy but do not commit it.
Another request comes it also try to get the last name for custId=1. Will it get Kathy or Hamlin.
My understanding is that if both the request get different connection object(which should be the case) the second request will get to see the Hamlin. But if they get same connection object , then second request object will see the last name as Kathy. P
lease let 开发者_Go百科me know if above understanding is correct?
Since you're in read-committed transaction isolation level (or higher, Oracle supports no lower), you will not see changes made by uncommitted other transactions, ever. Beware that especially in serializable mode, your query may be required to wait for other transaction to commit or rollback, or alternatively your transaction may be rolled back for you.
Oracle only supports read committed and serializable (you can pick, e.g., via SET TRANSACTION ISOLATION LEVEL
); other database systems additional support read-uncommitted, which would allow you to see the updated but not yet committed value.
if you are in the same transaction, you will see your uncommitted values (but not other peoples/transactions).
any other access will see the most recently read-consistent view of the things that have been comitted.
精彩评论