Slide 16
Slide 16 text
(M, 2)
43
48
77
79
89 (R, 4)
117
176
178
190
(Z, 2)
200
233
c
(Q, 2)
(Q, 1)
PK ref
(R, 2)
(R, 1)
(R, 3)
(Z, 1)
(M, 3)
(M, 1)
index_on_c
M 1 117
M 2 43
M 3 178
Q 1 79
Q 2 48
R 1 176
R 2 200
R 3 190
R 4 89
Z 1 233
Z 2 77
a b c d
aaaa
bbbb
cccc
dddd
eeee
ffff
gggg
hhhh
iiii
rrrr
zzzz
table_pk_a_b
SELECT a, b, c, d FROM table
WHERE c > 70 AND c < 150
Secondary Index
for each Row maching
“there will be a lookup“
on the primary key
Database Indexing
Clustered
Index
Non-Clustered
Index