Multiple choice technology databases

Which Oracle access method is the fastest way for Oracle to retrieve a single row?

  1. Primary key access

  2. Access via unique index

  3. Table access by ROWID

  4. Full table scan

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

ROWID access is fastest because ROWID contains the physical disk address of the row, enabling direct retrieval without traversing indexes. Primary key and unique index access require index traversal to find the ROWID first, then row access. Full table scan reads all blocks, making it slowest for single-row retrieval. ROWID is essentially a direct pointer to the row's location on disk.

AI explanation

Accessing a row directly by its ROWID is the fastest single-row retrieval method in Oracle because ROWID encodes the exact physical location of the row (data file, block, and row-within-block), letting Oracle go straight to the block with no further lookup — no index traversal, no key comparison. Primary key access and unique index access are also fast (typically O(log n) via a B-tree), but they still require navigating the index structure before finally following a ROWID to the row, making them one step slower than a direct ROWID access. A full table scan is by far the slowest for single-row lookups since it reads every block. Hence "Table access by ROWID" is correctly marked as fastest.