I learned that after hashing algorithm 32bit ROW HASH is generated.
First 16bit helps in determining AMP in which we will store our row.
However I want to know what role does last 16bit have?
Actually, in recent versions the first 20 bits of the hash are used to select the AMP. The entire 32-bit hash is used to determine the physical placement of the row within the hash. Thus rows with the same primary index value will be physically adjacent.
I used to think that last 16bits are used to identify Table to which it belongs to.
Can you confirm if last 16bits act as Table ID or not ?
No. The table ID is a separate 32-bit number.
the 1st 16 bits tell the bucket number in the hash map which in turn points to the amp containing that row hash value. The 32 bits on a whole tell the AMP, the location of the row in the disk.