CST 363 - Week 5

If indexes are supposed to speed up performance of query,  what does the author mean by a slow index? 

Per the author, there are cases in which index lookup isn't as fast as one can expect it to be. This can happen due to lead node chain and table access. Using an example of two matching entries, the database must read the next leaf node in order to find more matching entries, creating a situation where lookup not only needs to follow the leaf chain, but also perform tree traversal. In terms of accessing the table, a single leaf node and corresponding table data may be scattered across many table blocks. The need to access these many blocks creates a slow index lookup as a result. The author highlights that origin of "slow indexes" myth is rooted in the misbelief that a slow lookup results from a "broken" or "unbalanced" tree, however there are operations that show how a database uses an index: index unique scan, index range scan, and table access by rowid. 

Comments

Popular Posts