DBMS Topics
Multi-Level Indexing
Last Updated : 21 May, 2026
As the data file grows, the index file also grows. A very large index file makes even binary search slow:
Problem with Single-Level Index
As the data file grows, the index file also grows. A very large index file makes even binary search slow:
| Data file | 1,000,000 records |
| Index file | 100,000 entries (sparse, one per block) |
| Index file blocks | 1,000 |
| Binary search on index | ⌈log₂(1000)⌉ = 10 block reads |
| Index file blocks | 100,000 |
| Binary search: ⌈log₂(100,000)⌉ = 17 block reads | worse |
| Solution: Build an INDEX ON THE INDEX | Multi-Level Index |
Concept of Multi-Level Indexing
A multi-level index treats the index file itself as an ordered file and builds another (sparser) index on top of it. This can be repeated, creating a tree of index levels.
| Level 3 (Top) | ┌──────────────────────────────┐ |
| Level 2 (Middle) | ┌──────────────┴───────────────┐ |
| Level 1 (Inner) | ┌──────────────┴───────────────┐ |
| Data File | ┌──────────────┴───────────────┐ |
How Multi-Level Search Works
Number of Levels Calculation
Let:
bfr_i= blocking factor of index (entries per index block)b= number of data blocks
Then:
- Level 1 index blocks = b (one entry per data block)
- Level 2 index blocks = ⌈b / bfr_i⌉
- Level 3 index blocks = ⌈(b / bfr_i) / bfr_i⌉ = ⌈b / bfr_i²⌉
- ...
- Number of levels = ⌈log_bfr_i(b)⌉
| Level 1 | 1,000,000 blocks |
| Level 2 | 10,000 blocks |
| Level 3 | 100 blocks |
| Level 4 | 1 block (root) |
Multi-Level Index Structure Diagram
| Level 2 Block | Level 2 Block | |
|---|---|---|
| [K_a | K_b | K_c ... ] | [K_p | K_q | K_r ... ] |
Multi-Level vs. B+ Tree
A pure multi-level index has a fixed tree structure and is rigid — insertions can cause cascading reorganizations.
This limitation led to the development of B-trees and B+ trees, which are self-balancing multi-level index structures that handle insertions and deletions gracefully by allowing nodes to split and merge.
All modern DBMS use B+ trees (not static multi-level indexes) as the underlying index structure because they automatically balance themselves.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Multi-Level Indexing.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this DBMS topic.
Search Terms
dbms, database management system, database notes, sql, unit, multi, level, indexing
Related DBMS Topics