Saturday, June 3, 2023

CST 363 Journal #5, Week #5

Indexes are data structures that provide quick access to specific data in a database table. They allow us to locate and retrieve data efficiently. There, however, seems to be a "myth" about slow indexes. These are cases where an index lookup might not work as fast as expected. There are factors that could contribute to this. For one, there could be a slow index lookup with the leaf node chain. This is when the index may have multiple entries that match the search, leading to a chain of leaf nodes. This contributes to additional overhead. Secondly, a slow index lookup could occur in accessing the table. Even if the index points to the desired data, accessing the corresponding table data can be time-consuming. Every hit in the index may correspond to scattered data across many tables. This causes an additional table access required for each hit, which can lead to a slowdown in the indexing. 

This slow index notion stems from a common misconception that an index lookup solely involves traversing the tree structure. Therefore, according to this idea, a slow index must be caused by a "broken" or "unbalanced" tree. Databases, like Oracle, have certain operations like INDEX UNIQUE SCAN, INDEX RANGE SCAN, and TABLE ACCESS BY INDEX ROWID. These operations reveal that an INDEX RANGE SCAN, which involves traversing the tree and following the leaf node chain, can lead to a reading of a large part of the index, which can lead to slower performance. 

A slow index can potentially lead to issues if the index lookup process encounters challenges such as following the leaf node chain and accessing corresponding table data. These can be detrimental to the efficiency of an index lookup and we must understand the limitations of indexes so we can better optimize database queries. 

No comments:

Post a Comment

CST 462S - Service Learning

Overall, my experience working as a volunteer for NTS was great and I wouldn't have changed it any way! What went well?  I'd say ove...