| Index type |
Structure |
Uses |
| B-tree index |
B-tree indexes store keys in sorted order using multiple levels of branch blocks and leaf blocks.
A lookup compares the search key against branch-block entries while descending the tree, then reads
leaf entries that contain the key value and row locator(s) (typically ROWIDs) for matching rows.
Composite (concatenated) B-tree indexes store multi-column keys using the same structure.
|
Default choice for OLTP. Best for highly selective predicates (e.g., primary keys, unique keys),
common equality lookups, and selective range scans. Also supports ordered retrieval when the
index leading columns match the ORDER BY.
|
| Bitmap index |
Bitmap indexes represent each distinct key value as a bitmap where each bit position maps to a row.
For predicates that combine multiple low-cardinality columns, Oracle can perform fast bitmap operations
(AND/OR) on the bitmaps to compute the candidate row set before visiting table blocks.
|
Best for analytic workloads and data warehouses, especially on low-cardinality columns (status flags,
categories, regions). Avoid for high-concurrency OLTP updates because bitmap maintenance can increase
contention and locking side-effects.
|
| Reverse key index |
Reverse key indexes use a B-tree structure, but Oracle reverses the bytes of the index key before storing
it (and reverses them back during access). This distribution helps spread inserts across many leaf blocks
when keys are monotonically increasing.
|
Useful when you see “hot” right-edge leaf block contention from sequential inserts (for example, increasing
numeric keys). Trade-off: reverse key indexes are generally not helpful for range scans on the original key
because the stored order no longer matches the natural order.
|
| Function-based index |
A function-based index stores the computed result of an expression (for example, UPPER(last_name),
TRUNC(order_date), or a deterministic expression). Oracle can use the index when the SQL predicate
matches the indexed expression, avoiding recomputation across rows during query execution.
|
Use when applications filter or sort on expressions instead of raw column values (case-insensitive search,
date bucketing, computed codes). Can be B-tree or bitmap depending on workload and cardinality.
|