Poor distribution of hash values from RecordId.hashCode()
---------------------------------------------------------
Key: DERBY-3280
URL: https://issues.apache.org/jira/browse/DERBY-3280
Project: Derby
Issue Type: Improvement
Components: Performance, Services, Store
Affects Versions: 10.4.0.0
Reporter: Knut Anders Hatlen
Assignee: Knut Anders Hatlen
The hash values returned by RecordId.hashCode() are constructed by performing
bitwise xor on the 32 least significant bits of the record number, the page
number, the container id and the segment id. Since all of these values tend to
be relatively small positive integers, the hash values also tend to be
clustered in a very small range. This leads to a higher frequency of hash
collisions in the lock table, which makes the hash tables work less efficiently
and thereby reduces the performance.
As an example, the simple join load in the test client attached to DERBY-1961
uses two tables, TENKTUP and ONEKTUP, with 10000 rows and 1000 rows,
respectively. The RecordIds for these 11000 rows map to less than 900 distinct
hash codes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.