5.3 Single-level indexes // 5.4 Multi-level indexes

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/7

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

8 Terms

1
New cards

table scan

  • A table scan is a database operation that reads table blocks directly, without accessing an index.

  • When a SELECT query is executed, the database examines the WHERE clause and estimates hit ratio. If hit ratio is high, the database performs a table scan. If hit ratio is low, the query needs only a few table blocks, performs index scan.

2
New cards

index scan

  • An index scan is a database operation that reads index blocks sequentially, in order to locate the needed table blocks.

3
New cards

Hit ratio / filter factor / selectivity

  • Hit ratio, also called filter factor or selectivity, is the percentage of table rows selected by a query.

  • When a SELECT query is executed, the database examines the WHERE clause and estimates hit ratio. If hit ratio is high, the database performs a table scan. If hit ratio is low, the query needs only a few table blocks, performs index scan.

4
New cards

binary search

  • Index must be sorted!

  • In a binary search, the database repeatedly splits the index in two until it finds the entry containing the search value.

    • The database first compares the search value to an entry in the middle of the index.

    • If the search value is less than the entry value, the search value is in the first half of the index. If not, the search value is in the second half.

5
New cards

dense index

  • A dense index contains an entry for every table row

6
New cards

sparse index

  • A sparse index contains an entry for every table block

7
New cards

multi-level index

  • A multi-level index stores column values and row pointers in a hierarchy.

  • Each level above the bottom is a sparse sorted index to the level below.

  • The number of index entries per block is called the fan-out of a multi-level index.

  • multi-level index is the most commonly used index type.

8
New cards

fan-out

  • The number of index entries per block is called the fan-out of a multi-level index.