We use one part file made up of 13 different files. The record key makes it
easy for us because they are all numeric. We just made the algorithm
MOD(key,13) + 1. The reason for 13, it's a prime number and the number of
records per file seem to come out about equal. Of course we don't have a
special purpose for each part file it's just to reduce the size of the file.
The set of files contains 2.3 million records but each part has less than
180 thousand.

Jerry Banker

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Brian Leach
Sent: Thursday, May 28, 2009 11:16 AM
To: [email protected]
Subject: RE: [U2] Best algorithm for UV part files

Hi Baker

Unless I misunderstand the question - it don't work like that :)

UniVerse uses the partitioning algorithm to determine which part file the
record goes into, based on some operation performed on the key that must
yield as its result a valid part file number. So you could, for example,
perform a hashing algorithm on the key by multiplying the seq() of each
character together and divide the whole lot by the number of parts to get a
modulus - just like the addressing inside a hashed file...

Once that algorithm is in place, every time you request a key it will
perform the same operation to determine in which part file it will find the
record.

So you don't need to specify the part file number along with the key - the
key determines the part file.

Regards

Brian

 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Baker Hughes
> Sent: 28 May 2009 16:06
> To: [email protected]
> Subject: RE: [U2] Best algorithm for UV part files
> 
> Very helpful Stuart (and Brian) thanks.
> 
> 1 follow-up question: given your algorithm below, when you 
> edit or copy those records over, what does the key look like. 
>  E.g. do you have to prefix the key generated by your 
> algorithm, with the part file number or name?  To edit the 
> record would you simply:
> 
> AE HAIRY.PF.NAME B123456
> 
> Or
> 
> AE HAIRY.PF.NAME 23-B123456  ?
> 
> 74 & Clear regards from Ft Worth,
> -Baker
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to