can non-key columns looked up?
Moderators: chulett, rschirm, roy
can non-key columns looked up?
can non-key columns looked up?Pls give the reason for yes or no
Devlopers corner
In server jobs, non-key columns in hashed file cannot be looked up. Nonkey columns in database stage can used for lookups.
The reasons are based on the underlying access methods. When using SQL you can select on non-key columns but the database might have to go and do a full table scan.
Hashed files are only keyed on their {unique} key and the way that hashed file stages are set up does not allow nonkeys to be used for selection criteria. You can always use an ODBC stage to access a hashed file and select on nonkey columns, but don't hold your breath when waiting for queries on large files to come back
The reasons are based on the underlying access methods. When using SQL you can select on non-key columns but the database might have to go and do a full table scan.
Hashed files are only keyed on their {unique} key and the way that hashed file stages are set up does not allow nonkeys to be used for selection criteria. You can always use an ODBC stage to access a hashed file and select on nonkey columns, but don't hold your breath when waiting for queries on large files to come back
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
You might want to expand a little bit on your question, Tom.
Hashed File stage? Database stage? What does the phrase 'non-key columns' mean to you? Sometimes people confuse columns marked as 'key' columns with 'indexed' or 'primary key' columns, but it doesn't mean that at all, hence the question. And by 'looked up' you mean what? In one sense, the 'non key' columns are exactly what you are looking up.
Hashed File stage? Database stage? What does the phrase 'non-key columns' mean to you? Sometimes people confuse columns marked as 'key' columns with 'indexed' or 'primary key' columns, but it doesn't mean that at all, hence the question. And by 'looked up' you mean what? In one sense, the 'non key' columns are exactly what you are looking up.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The short answer is "yes", except if using a Hashed File stage.
The next question is probably "how?". Think of "Key" in the metadata meaning "search key" rather than "primary key" in this context. Post a specific requirement to get a specific answer.
The next question is probably "how?". Think of "Key" in the metadata meaning "search key" rather than "primary key" in this context. Post a specific requirement to get a specific answer.
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.