Databases Reference
In-Depth Information
Figure 2-1. Physical layout of a table and B-tree index
There are two dotted lines in Figure 2-1. These lines depict how the ROWID (in the index structure)
points to the physical row in the table for the column values of ACER. These particular values will be
used in the scenarios described next. When selecting data from a table and its corresponding index,
there are three basic situations.
All table data required by the SQL query is contained in the index structure.
Therefore, only the index blocks need to be accessed. The blocks from the table
are not read.
All of the information required by the query is not contained in the index blocks.
Therefore, the query optimizer chooses to access both the index blocks and the
table blocks to retrieve the data needed to satisfy the results of the query.
The query optimizer chooses not to access the index. Therefore, only the table
blocks are accessed.
These situations are covered in the next three subsections.
 
Search WWH ::




Custom Search