Search code examples
hashindexingdata-partitioningconsistent-hashing

Hashing VS Indexing


Both hashing and indexing are use to partition data on some pre- defined formula. But I am unable to understand the key difference between the two.

As in hashing we are dividing the data on the basis of some key value pair, similarly in Indexing also we are dividing data on some pre defined values.

Can any one please help me out the difference between Hashing and Indexing, and how to decide whether to use hashing or Indexing.


Solution

  • Hashing is a specific case of indexing:

    Hashing vs. Indexing

    Indexing is a general name for a process of partitioning intended at speeding up data look-ups. Indexing can partition the data set based on a value of a field or a combination of fields. It can also partition the data set based on a value of a function, called hash function, computed from the data in a field or a combination of fields. In this specific case, indexing is called data hashing.