Set 3-3 Flashcards
(18 cards)
The bottom level of a multi-level index is always sparse.
False
Levels above the bottom of a multi-level index are always sparse.
True
Each column value appears at most once in a multi-level index.
False
In a sparse multi-level index, each table block pointer appears exactly once.
True
Assume a table has 1,000,000 rows. Index entries are 26 bytes, and index blocks are 8 kilobytes. Use a calculator to compute logs.
What is the fan-out for a multi-level index?
Approximately 300
Assume a table has 1,000,000 rows. Index entries are 26 bytes, and index blocks are 8 kilobytes. Use a calculator to compute logs.
How many levels does a dense multi-level index have?
3
Assume a table has 1,000,000 rows. Index entries are 26 bytes, and index blocks are 8 kilobytes. Use a calculator to compute logs.
If table blocks are 2 kilobytes and rows are 100 bytes, how many levels does a sparse multi-level index have?
2
Number of rows / rows per table block
Table Scan
Number of index blocks plus referenced table blocks.
Single-level Index Scan
log base 2 (number of index blocks) plus referenced table blocks.
Single-level index binary search
log base fan-out (number of rows), rounded up, plus referenced table blocks.
Multi-level dense index search
log base fan-out (number of rows / rows per table block), rounded up, plus referenced table blocks.
Multi-level sparse index search
If the index is sparse, an insert to the table always generates a new index level.
False
If the index is dense, an insert to the table always generates a new index level.
True
If the index is dense, an update to the indexed column always generates a new index level.
False
Which type of index can have table block pointers at any level?
B-tree
In informal use, the term ‘B-tree’ commonly means:
Either a B-tree or a B+tree index
Which index structure enables an index scan using the bottom level only?
B+tree