Indexing

Indexing

by Tianyi Zhang -
Number of replies: 0

"Indexing is a way to optimize the performance of data by minimizing the number of disk accesses required when a query is processed. It is a data structure technique which is used to quickly locate and access the data in a database."

To structure an index, there are search key and pointer.  Search key is kind of like primary key. Pointer records the address of the data unit. For example, we want to get 7th item in the data. 7 is as an input to get the data. Then, pointer at 7 will be get, which will point to the address of data on the disk. On this base, using indexing will be very efficient in searching. Because we do not have access the data until we get the specific address. What we need to do is only to search the search keys.

Searching for search keys is easy because search keys are in an ordered condition, which means we can use binary tree or hash table to construct the search keys. It makes the searching much faster than simply searching the data.

https://www.geeksforgeeks.org/indexing-in-databases-set-1/