Database Reference
In-Depth Information
index. An index object is physically much smaller than the table and is
therefore faster to search through because less I/O is required. Additionally,
special forms of indexes can be created where scanning of the entire index is
seldom required, making data retrieval using indexes even faster as a result.
Note:
A table is located in what is often called the data space and an index
in the index space.
Attached to each row in an index is an address pointer (ROWID) to the
physical location of a row in a table on disk. Reading an index will retrieve
one or more table ROWID pointers. The ROWID is then used to find the
table row precisely. Figure 21.1 shows a conceptual view of a table with an
index on the NAME column. The index stores the indexed column
(NAME) and the ROWID of the corresponding row. The index's rows are
stored in sorted order by NAME. The table's data is not stored in any sorted
order. Usually, rows are stored into tables sequentially as they are inserted,
regardless of the value of the NAME or any other column. In other words, a
table is not ordered, whereas an index is ordered.
Figure 21.1
Each Index Entry
Points to a Row of
Data in the Table.
Search WWH ::




Custom Search