Monday, 4 November 2019

How Database index is functioning?


Indexing is a way to optimize the performance of a database 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.

Indexes are created using a few database columns.
  1. The first column is the Search key that contains a copy of the primary key or candidate key of the table. These values are stored in sorted order so that the corresponding data can be accessed quickly.
  2. Note: The data may or may not be stored in sorted order.
  3. The second column is the Data Reference or Pointer which contains a set of pointers holding the address of the disk block where that particular key value can be found.


No comments:

Post a Comment

Interactor in Rails

What is interactor? Interactor provides a common interface for performing complex user interactions An interactor is a simple, sin...