The rowid acts pointer locate the specified row
586 Part III ✦ Administering Storage for Oracle Objects
< 34 | Root Level |
< 201 | < 234 | ||
---|---|---|---|---|---|
101 - 200 | |||||
< 134 | |||||
< 65 | < 165 | < 265 | |||
34 - 65 | 134 - 165 | 234 - 265 | |||
|
Leaf
Blocks
Example of one Index Entry | ||
---|---|---|
Figure 12-1: Structure of B-tree index
Format of the index Leaf Blocks
✦ ROWID stores the ROWID from the table that the column references. The ROWID acts as a pointer to locate the specified row. Oracle uses the restricted ROWID format in indexes because all index entries belong to the same segment. For indexes on parti-tioned tables, Oracle uses the extended ROWID format since index entries can point to different segments of a partitioned table. Oracle needs the Object Identifier to identify the segment.
How indexes are used by SQL statements
If Oracle detects that there is an index on a column referenced in the SQL Statement, it will generally use it. (The algorithm applied is beyond the scope of this book.) When it uses the index, it first goes to the Root Level of the index being used and starts climbing the Branches until it finds the column value being indexed. For exam-ple, if the following query were written and using Figure 12-1 as a reference:
✦ Inserts result in Oracle inserting the entry on the specific Leaf Block. Since indexes are sorted, the entry must go to a specific block. Problems can occur if Oracle attempts to insert a new index value and there is no room left on the Leaf Block. When this happens, Oracle performs an Index Block Split. It takes