# `HashJoin` Operator - Cont'd

![`smart`](HashJoin02_aa_002_20230912.png)

------------------------------------------------------------------------------
After loading the driving table `employees` into the cache, a `Hash index` is constructed for it. For instance, let's say that the hash function is the remainder of dividing by 10,000. If we query row 10,001, the hash value will be 1. In the `Hash index`, this value maps to row 10,001 in the `employees` table.

However, there is a potential issue: hash collisions. For example, if the hash values for rows 10,002, 20,002, 30,002, and 40,002 also result in the value 2, this creates multiple entries in the `employees` table with the same hash value. The probability of hash collisions decreases as the number of possible hash values increases.