All Forums Database
tdice 55 posts Joined 01/11
29 Jan 2012
redistribution or not

I have PI on (COL1,COL2,COL3) of a table. If I use col1 and col2 in WHERE clause
while fetching the data from the table,then is the tables data gets redistributed
according to (col1,col2) rowhash combination to display result set or is the teradata
 clever enough to find out result set from already rowhashed value of (col1,col2,col3)
 

Thanks

 

ulrich 816 posts Joined 09/09
29 Jan 2012

Not 100% sure that I understand your question. 

But assume you have a query

Select *

from yourTable

where col1 = X and col2 = Y

where yourTable has a PI on (col1,col2,col3).

You will see in the explain a full table scan - no PI access - but no further redistribution of the data.

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

tdice 55 posts Joined 01/11
30 Jan 2012

Ulrich, your understing is correct.

 

Thanks

 

You must sign in to leave a comment.