Secondary Index on multiple columns

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dhiraj
Participant
Posts: 68
Joined: Sat Dec 06, 2003 7:03 am

Secondary Index on multiple columns

Post by dhiraj »

Hello,

Is it possible to create a secondary index on multiple columns of a hash file that was created using mkdbfile command (that is, in a directory).

I have a hashed file, that has been hashed on columns A and B and has data columns C,D,E,F.
Now i have a requirement to look up this hash file based on columns C and D. How do i do this? Is the method of creating secondary indexes advicable? if so how do i create indexes on multiple columns for file that have been created using mkdbfile command.

Thanks
Dhiraj
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

dhiraj,

you will need to create a VOC entry to this file and enter information in the DICT portion - once that is done you can use CREATE.INDEX and BUILD.INDEX to put your secondary lookup key on your columns C and D. If speed is very important then it would be advisable to create another hash file with C & D as the key; since a hash file lookup done directly is much faster than a UVODBC lookup.
Post Reply