CST 363 - Week 5 Learning Journal

Prompt:

The web site "Use the Index Luke" has a page on "slow indexes".   https://use-the-index-luke.com/sql/anatomy/slow-indexes

Links to an external site.

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


When the author writes about a "slow index", he means that even though a query uses an index, the overall performance can still be poor. An index lookup is not just a simple tree traversal - two other factors can slow it down: 

1) Leaf-node chaining: If multiple entries match, the index must follow the linked leaf nodes to gather all matches

2) Table access per hit: after finding matching index entries, the engine often has to fetch the actual rows from the table, which may be scattered across disk pages. 

Since these latter steps can require many random I/O operations, they can dominate cost and make even an "indexed" query run slowly. 


Comments

Popular posts from this blog

CST 349 - Week 4 Learning Journal

CST349 Week 2 - Learning Journal

CST 349 - Week 5 Learning Journal