Previously, i'm using a ORACLE OCI8 to load data
with a query a bind variables:
SELECT * FROM SOMETABLE
WHERE :1 BETWEEN FLD1 AND FLD2
AND :2 BETWEEN FLD3 AND FLD4
these are the key fields:
FLD1, FLD2, FLD3, FLD4
field non-key:
FLD5
i have no problem with this...
now, i want to do the same by using a hashed file,
my question is how will i do that with same definition as
the table...
i will use the hashed file for lookups...
thanks
hashed file with multiple keys
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 3
- Joined: Mon Jun 27, 2005 7:46 pm
hashed file with multiple keys
P®o©®AsTiÑaTo®™
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard! :D
Hashed file can not be used for BETWEEN or any other kind of lookup apart from key = value. End of story. Search the forum for BETWEEN to see what I mean.
The reason is the way hashed files work. The record is found by applying a function to the key value returning the address of the page on which the record is located. There is no primary key index, there is no table scan; there is a single I/O. The function is also called the "hashing algorithm".
Hashed file can not be used for BETWEEN or any other kind of lookup apart from key = value. End of story. Search the forum for BETWEEN to see what I mean.
The reason is the way hashed files work. The record is found by applying a function to the key value returning the address of the page on which the record is located. There is no primary key index, there is no table scan; there is a single I/O. The function is also called the "hashing algorithm".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3
- Joined: Mon Jun 27, 2005 7:46 pm