Search for its storage location in the index table based on the keyword, and then read the record from the storage location.
Each index item contains at least the location information of the keyword and its corresponding record in the memory.
8.4.1 dense Index
Each record in the Data corresponds to an index. When the data volume is large, the index item will be large and the efficiency will be reduced.
If the index items are ordered, you can use ordered algorithms, such as half-fold, interpolation, and Fibonacci to search for them. If the index items are not ordered, you can only use sequential search algorithms.
8.4.2 multipart Index
When the data volume is large, the data can be segmented, ordered between blocks, and unordered within blocks. You can use half-fold, interpolation, and Fibonacci searches between blocks. You can only use sequential searches within a block.
8.4.3 inverted index
It is mainly used to search for words that contain all the searched content in those articles ). Similar to search engines.
The record number table stores all records with the same keywords. Because the location of the record is determined based on the attribute, and the attribute value is determined by the record, it is called an inverted index.
This article is from "Li Haichuan" blog, please be sure to keep this source http://lihaichuan.blog.51cto.com/498079/1282337