View previous topic :: View next topic
|
Author |
Message |
kris_madras Warnings : 1 New User
Joined: 04 Jul 2005 Posts: 31
|
|
|
|
I was under assumption that the root segments keys will be in the ascending order. When I checked my workshop database root segments, I wondered they are not in the sequence. For example if have TYRE-NO is defined as key in the root segment of length 5 bytes. The order I am seeing (for each GN calls) '55555', '44444', '11111', '33333'.
Why is it so like this? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Possibly your Data-base is HDAM. Form manuals, in a hierarchic direct access method (HDAM) database, the root segments of records are randomized to a storage location by an algorithm that converts a root's key into a storage location. No index or sequential ordering of records or segments is involved.
The randomizing module reads the root's key and, through an arithmetic technique, determines the storage address of the root segment. The storage location to which the roots are randomized are called anchor points or root anchor points (RAPs). |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
If you want to know WHY they do this, it's all about physical disk access.
If your key is something that goes up when new data is added, ie first case is 1, second case is 2, then all of your new data would be lumped together on the disk.
Since most of the work being done is on the newest set of cases, then all of the disk access would be trying to get to the same areas of the hard drives. There are only so many concurrent read/writes allowed by any system of access, so this would create a huge bottleneck on a busy system.
Therefore, they spread around the data so that concurrent accesses are reading/writing widely separated areas of the disk(s). |
|
Back to top |
|
|
|