Some times I need to create hash files with more than one keys. But in the transformer stage, I can't look up what I want.
Thanks
Can Hash File have more than one keys?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A hashed file can have only one primary key (at a physical level), but it can have more than one column in that key. The total number of characters in all key columns may not exceed the number specified by MAXKEYLENGTH parameter in the uvconfig file.
To perform a lookup against a hashed file, a key expression must provide a value for each of the hashed file's key columns. It is NOT possible to perform a partial key lookup against a hashed file using a Hashed File stage, though it can be accomplished by a UV stage.
To perform a lookup against a hashed file, a key expression must provide a value for each of the hashed file's key columns. It is NOT possible to perform a partial key lookup against a hashed file using a Hashed File stage, though it can be accomplished by a UV stage.
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.
EdWink - Ray did say what that length is - go to the uvconfig file in your DS directory and look for the value of MAXKEYLENGTH
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In older versions (earlier than 6.0?) the default was 255. Nowadays it's 768, as Kim observes. Larger keys have implications for sizing the groups (pages) in the hashed file; after all, the entire key must be able to be stored. For example, the combination of 768-character keys and 512-byte pages simply would not work.
Recommended practice, for best performance, is to keep the size of hashed file keys (and, indeed, the size of hashed file data records) as small as possible.
Recommended practice, for best performance, is to keep the size of hashed file keys (and, indeed, the size of hashed file data records) as small as possible.
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.
alternatively on unix you can try this command from your OS command promptEdwink wrote:Ray, can u say wat wil be the lengthlimit for the primary key colum(physicallevel)?
Code: Select all
$DSHOME/bin/smat -a | grep MAXKEYSIZE