db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Created: (DERBY-3280) Poor distribution of hash values from RecordId.hashCode()
Date Sat, 15 Dec 2007 18:39:43 GMT
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.


Mime
View raw message