Page 1 of 1

Secondary Index on multiple columns

Posted: Mon Jun 20, 2005 7:44 am
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

Posted: Mon Jun 20, 2005 7:54 am
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.