We all know that data blocks are the most basic read/write units in oracle, but the data you need is not the whole block, but the rows or columns in the block. when a user issues an SQL statement, the statement is parsed and executed, and the data capture phase begins. In this phase, the server process first reads the data block of the row from the data file into the buffer cache. This process is called physical read. each read block is a physical read. when a block is sent to the buffer cache, the block cannot be sent to the user immediately, because what the user needs is not the entire block, but the row in the block. the process of reading rows from buffer cache blocks is logical reading. to complete a logical read, the server process first needs to find the cache buffer chain of the block in the hash table. after finding the block, you need to add a cache buffer chains latch to the chain. After the block is successfully added, search for the specified block in the chain and add a pin lock to the block. and release the cache buffer chains. then you can access the rows in the block. the server process does not fetch all the rows that meet the condition in the block once, but retrieves a certain number of rows each time based on your capture command. after these rows are extracted, they are transmitted to the client user Through PGA. once the row is removed from the buffer cache, the session needs to release the PIN added to the block. this logical read ends. if you want to capture the remaining lines in the block, the server process will apply for a cache bufffer link again. add PIN to the block again. this is even another logical read. that is to say, each time a server process applies for a cache buffer chock, it is a logical read. the number of rows read by each logical read can be set in the capture command.
Logical read is closely related to the Cache buffer chains latches. TOM once mentioned that each time a process applies for a Cache buffer chains latch, it is a logical read. However, logical read is not equivalent to the Cache buffer chains latches. Each logical read requires at least two Cache buffer chains latches in 9i. Logical read refers to the process of locating blocks in the Hash table.
Author "smart"