Database Reference
In-Depth Information
From the preceding output, using the data in P1 and P2 , the related object information could be obtained using
the following query:
SELECT segment_name
FROM dba_extents
WHERE file_id = &file
AND &block BETWEEN block_id AND block_id + blocks - 1
AND ROWNUM = 1;
Enter value for file: 7
Enter value for block: 159
old 3: where file_id = &FILE and &BLOCK between block_id and block_id + blocks - 1 and rownum = 1
new 3: where file_id = 7 and 159 between block_id and block_id + blocks - 1 and rownum = 1
SEGMENT_NAME
--------------------------------------------------------------------------------
WAREHOUSE
Current and CR (consistent read) waits are based on current and CR blocks in the buffer of various instances.
What is the difference between CR and current waits?
Consistent Read vs. Current
The very first time a block is read into a buffer of any participating instance, it's termed a current block, no matter
what the purpose of the user accessing the block may be: meaning it could be a SELECT operation or a DML operation.
The first access is always termed a current operation. Subsequently, a CR block is when the block is transferred from
one instance to another instance because a session on that instance requested the block.
As discussed in Chapter 2, when a block is required by a process for read purposes, it accesses the block in shared
mode. When the block is to be modified, the processes would require a grant from the GCS to access this block in
exclusive mode. The frequency of state/grant changes to the block can be obtained by querying STATE column from
GV$BH view. The RAC-related state changes are the following: 8
XCUR —exclusive current
SCUR —shared current
CR —consistent read
READ —reading from disk
WRITE —write clone mode
PI —past image
When blocks are required by more than one process on the same instance, Oracle will clone the block. The
number of times a block can be cloned is defined by the parameter _DB_BLOCK_MAX_CR_DBA 9 and defaults to six,
meaning only six cloned copies of the same block of the same DBA (data block address) can exist in the local buffer
of an instance. The CR blocks are treated like any other data block and use the Touch Count Algorithm (TCA). Under
TCA, the block read is placed at midpoint (insertion point) in the buffer cache and will have to gain creditability when
sessions access or touch the block to climb up the stack to reach the hot buffer area. If the block is not touched by other
sessions, it will move down the stack and finally get flushed out when new blocks need the buffer.
8 Tierney, Brian L., Jason R. Lee, Dan Gunter, Martin Stoufer, and Tom Dunigan, “Improving Distributed Application Performance
Using TCP Instrumentation.” Berkeley, CA: Lawrence Berkeley National Laboratory, May 2003.
9 Underscore parameters should be modified only after consulting with Oracle support.
 
Search WWH ::




Custom Search