This learning journal entry is in response to the following article:
https://use-the-index-luke.com/sql/anatomy/slow-indexes
Q: If indexes are supposed to speed up performance of query, what does the author mean by a slow index?
In the article the author refers to a slow index as an index where the database traversing not only the index tree structure but also multiple leaf nodes to find all matches. What this means is that although indexes help the database close in on the requested data without having to look at every node, it can still be slow because it will need to follow multiple branches to ensure it finds all of the matching keys. With leaf nodes possibly having many matches the requested data can span across multiple blocks.
Slow indexes are a myth due to the mistaken belief that the index lookup only involves tree traversal when in reality is also involves following leaf node chains and fetching the table data where there is no limit to the amount of block access requests that it may need to perform.
Comments
Post a Comment