Arlon's CSUMB Intro to Database Systems CST-363 Module 5 Learning Journal #5/#21 for the week Wed 05/26-Tues 06/01, year 2021
Prompt for week 5:
The web site "Use the Index Luke" has a page on "slow indexes". If indexes are supposed to speed up performance of query, what is meant by a slow index?
Sometimes indexes don't help! We learned that for the homework this week. If you do a select with a where clause with an inequality that will wind up accessing more than 50% (or some threshold) of rows, the index adds more overhead than it helps, and MySQL makes the decision to skip the index because it won't help anyway. As discussed on the use-the-index-luke slow index pages, the leaf node chain has to be followed, the tree has to be traversed, and the table data still has to be fetched. So the term slow index means that - there's an index present - and it doesn't seem to be helping - and the real reason isn't that you need to re-build the index - but that you need to optimize the queries that seem slow - and properly index in a custom way according to queries you will actually be making.
Actual Journal Notes:
I need to practice more with indexes to get a better feel for when they are going to work and when they aren't. This week of learning seemed like quite a bit of theory, so I plan on doing more practice problems of this type to gain more expertise in indexing, optimizing and understanding how to properly make a database.
Comments
Post a Comment