Re: Block level contention
Posted by ErmanArslansOracleBlog on
URL: http://erman-arslan-s-oracle-forum.114.s1.nabble.com/Block-level-contention-tp7249p7260.html
You are talking about hot blocks and you are talking about cache buffers chains latch.
They are for protecting the accesss to these hash chains.
I mean, this latch protects the array of pointers, which point to the lists of blocks.
So, after getting the cache buffer chains latch, we get a block out of one of these lists.
In other words, the blocks in the buffer cache are stored on linked lists (cache buffer chains), and that latch is protecting these linked lists.
Now, lets go a little bit further.
When Oracle updates a block in the buffer cache, Oracle copies the relevant buffer and updates that copy.
Similarly, if a query wants to query a row from a block on a certain SCN nuber, Oracle copies the relevant buffer and returns the data from that copy.
So, there are versions/copies.. (Consistent Read versions and XCUR -- exclusive current copies)
Updates are done on copies.
In short, the operation "updating a different row in the same block" will not be blocked.
You can do it.. Locking mechanism will not stop you.. Latches will not stop you..
However, if you do several updates for the same block in parallel , then your updates will slow down..
you will slow down because of the cache buffer chain contention. (hot block)
While your updates are slowing down, your system's load will be increased..
Remember, we try to get the latches by spinning on Cpu.
I hope you understand what I mean.