All Forums Database
JustMe 76 posts Joined 03/07
04 May 2016
Evaluating for Primary Index

Good morning,
I have a table that is highly skewed.  The currentperm per amp ranges from a high of  7,828,770,304  to a low of 1,762,582.528.  There are 42 amps on the system.
I would like to evaluate the data for a possible change to the primary index.
What is the best way to accomplish the evaluation?  Does Teradata have recommended queries for thi?
 
Thank you!

AtardecerR0j0 71 posts Joined 09/12
05 May 2016
select hashamp(hashbucket(hashrow(YOUR_COLUMN))), count(1) 
from YOUR_TABLE
group by 1

You can use the above query. YOUR_COLUMN can be replaced by a group of columns to test as a possible PI.

Be More!!

AtardecerR0j0 71 posts Joined 09/12
05 May 2016

With this query you'll get in advance the distribution by AMP if you use "YOUR_COLUMN" as PI

Be More!!

JustMe 76 posts Joined 03/07
05 May 2016

Thank you so much

You must sign in to leave a comment.