Subjects database indexing

Sparse Index Entries Ff8Ade

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **State the problem:** We have a table with 30,000,000 rows, each row is 100 bytes, and the table and index blocks are 2 kilobytes (2,000 bytes). The index is sparse, and we want to find how many entries are in the index. 2. **Understand sparse index:** A sparse index stores one index entry per block of the data file, not per row. So the number of index entries equals the number of data blocks. 3. **Calculate the size of the data file:** $$\text{Total data size} = 30,000,000 \times 100 = 3,000,000,000 \text{ bytes}$$ 4. **Calculate the number of data blocks:** Each block is 2,000 bytes, so $$\text{Number of data blocks} = \frac{3,000,000,000}{2,000} = 1,500,000$$ 5. **Number of index entries:** Since the index is sparse, the number of index entries equals the number of data blocks: $$\boxed{1,500,000}$$ This means the sparse index has 1,500,000 entries.