The web site "Use the Index Luke" has a page on "slow indexes". https://use-the-index-luke.com/sql/anatomy/slow-indexesLinks to an external site.
If indexes are supposed to speed up performance of query, what does the author mean by a slow index?
I think what the author means is that sometimes the process is slow despite using index.
As directly stated by him:
"An index lookup requires three steps: (1) the tree traversal; (2) following the leaf node chain; (3) fetching the table data. The tree traversal is the only step that has an upper bound for the number of accessed blocks—the index depth. The other two steps might need to access many blocks—they cause a slow index lookup,"
he is saying that the search process using index is actually 3 steps and the last 2 steps can slow down the process, thus resulting in a slow speed despite having used indexes. The slowdown process in step 2 can happen when there are too many matches and the slowdown in step 3 can happen when the data is scattered all over the memory.
No comments:
Post a Comment