Hi iam Kishore.....here is my question.....suppose if have a skewfactor of 40%....then how to avoid the skewfactor...as the PI cannot be altered after table creation?
Yes, you need to create a new table with a different PI which has a better skew value.
You can check the impact of a different PI by using the hashamp(hashbucket(hashrow(PI COL list))) functions.
select hashamp(hashbucket(hashrow(NEW PI COL list))),
cast(count(*) as decimal(18,0))
from your table
group by 1
order by 1
would give you the row distribution of the new PI.
But never forget: A pi should serve at least TWO purposes - distribution and access!
i am new to teradata, HOW REDUCE SKEW FACTOR IF IT IS >60 . IN TABLE I HAVE NUPI, SHALL I GO FOR COMBINATION OF COLUMN AS PI TO CHECK SKEW FACTOR . WHAT ARE OTHER APPROACH TO REDUCE SKEW FACTOR
Read the above post by ulrich.
In short yes, if you want to reduce the skeweness you need to check which columns or combination of columns provide better distribution.
can we take timestamp column as PI. HERE is my table structure can you guide me col should/shouldn't be take as PI.
The order of columns in defining PI doesnt matter.
No harm in adding Timestamp column, given it makes sense as per the table type and data it contains. What is the type of table? Is it staging table or DWH table?
PI is selected to give you bettter distribution and more importantly less or no re-distribution while using table. As its a stage table, you need to check transformation rules to know which colymns will be used for joining/transforming data. You should also know which columns are PK at the source side .... that will give you better distribution and most probably may also be used in tranformation logic.