In the indexed files seen in previous posts, the table of indexes is accessed sequentially with the drawbacks that I already mentioned this type of access has. However, there is a much more efficient indexing technique than sequential indexing and that is tree indexing, which significantly reduces search time. In this post, I will explain the aforementioned technique.
Using sequential access, when looking for data, it has to go through the index file sequentially until we find the searched one, obtaining the memory address of the beginning of the record in the data file. As index tables are much less heavy than files with all the data, we have a considerable improvement using indexes, even if the search in the table for these is sequential.
By changing the index table of sequential access to an organization of the indexes in a data tree, it will be able to access the indexes much more quickly. These types of structures are specially indicated to speed up searches, but let’s see how it does.
Continue reading Tree indexing