File type option in hashed files

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

File type option in hashed files

Post by admin »

Hello to all again.
Im trying to find in the manual the description of all of the file types
present in the file type option present in the options in the hashed file
stage, perhaps i didnt look to hard ..., or i need new glasses, anyway can
anybody tel me where can i find information about all hashed files types?
Thanks:
Pedro

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

Pedro Santos wrote:
> Hello to all again.
> Im trying to find in the manual the description of all of the file types
> present in the file type option present in the options in the hashed file
> stage, perhaps i didnt look to hard ..., or i need new glasses, anyway can
> anybody tell me where can i find information about all hashed files types? > Thanks: > Pedro

***

There are more files types than anybody needs, and you dont need to know about them all, but if youre really curious, then ...

First, see:
Reference book = "UniVerse System Description" (Informix Part Number "000-6952") Chapter = "Creating a Database" Section = "Creating Files" Sub-Section = "File Types"

***

Some additional info:

A file type is specified as an integer in the range 1 through 19, or 25, or 30.

The 18 hashed file types and their official (but misleading) descriptions:
*TYPE* *USAGE*
2 Static Modulo. Hashed. Keys end with numbers.
3 Static Modulo. Hashed. Keys end mainly with numbers.
4 Static Modulo. Hashed. Keys end with letters.
5 Static Modulo. Hashed. Keys end with full range of ASCII characters.
6 Static Modulo. Hashed. Keys begin with numbers.
7 Static Modulo. Hashed. Keys begin mainly with numbers.
8 Static Modulo. Hashed. Keys begin with letters.
9 Static Modulo. Hashed. Keys begin with full range of ASCII characters.
10 Static Modulo. Hashed. Keys are numbers.
11 Static Modulo. Hashed. Keys are mainly numbers.
12 Static Modulo. Hashed. Keys are letters.
13 Static Modulo. Hashed. Keys are full range of ASCII characters.
14 Static Modulo. Hashed. Entire keys are numbers.
15 Static Modulo. Hashed. Entire keys are mainly numbers.
16 Static Modulo. Hashed. Entire keys are letters.
17 Static Modulo. Hashed. Entire keys are full range of ASCII characters.
18 Static Modulo. Hashed. Entire keys are of arbitrary form.
30 Dynamic Modulo. Hashed. Modulo will grow as needed.


The 4 non-hashed file types are:
*TYPE* *USAGE*
1 Sub-UFD (o/s directory) used as a "file",
containing files used as "records", and using short directory names.
19 Sub-UFD (o/s directory) used as a "file",
containing files used as "records", and using long directory names.
25 B-tree. Used internally for the index files in "I_..." directories.
27 Used internally to store information about multi-part files.

Most people just use type 30 (dynamic modulo) for all hashed data files.

For keys which are always a single range of sequential integers, type 2 will give you perfect rectangular hashing.

Type 18 is usually the best or second-best or third-best hash type for a file, and many people just use type 18 for all static modulo files.

Types 3 through 17, despite their official descriptions, often yield "clumpy" (non-rectangular) hashing, which is bad.

So, dont use types 2 through 17 except when needed (probably never).

Use type 18 if you need a static modulo.

As a general and simple rule, now that you know about types 2 through 18, just forget about them, and use type 30.
--
Ben Rosenberg
Bloomfield, NJ, USA
mailto:datastage@rosenberg.org
Locked