How to find No. of Records present in Each AMP or a Node
for a given Table through SQL?

Answers were Sorted based on User's Feedback



How to find No. of Records present in Each AMP or a Node for a given Table through SQL?..

Answer / n

Sel HASHAMP(HASHBUCKET(HASHROW(PRIMARY_INDEX_COLUMNS)))
AS AMP_NO,
COUNT(*)
From DATABASENAME.TABLE_NAME
GROUP BY 1;

Is This Answer Correct ?    30 Yes 2 No

How to find No. of Records present in Each AMP or a Node for a given Table through SQL?..

Answer / yuvaevergreen

Adding to the above,
hashrow gives the unique row hash (23 bit value) for any
value given as a parameter.
hashbucket gives the bucket value (16 bit) for any hashrow.
hashmap gives the ampno for the hashbucket.
Since, PI must be defined for any table, this hashing
function can be used to determine the ampno and the no of
rows in the amps.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Teradata Interview Questions

What do you mean by teradata intellicloud?

0 Answers  


i am pursuing mca and i want to do tera data .so plz suggest me the best institue in hydrabad who teach real tym scenerio.

1 Answers  


what is identity columns in TD?

2 Answers   Wipro,


Can we collect statistics on multiple columns?

0 Answers  


What is a level of granularity of a fact table?

0 Answers  


Differentiate database data and data warehouse data?

0 Answers  


how to load or extract the error table data ?

3 Answers  


Highlight a few of the important components of Teradata?

0 Answers  


What are the types of tables in Teradata

22 Answers   Cap Gemini, Cognizant, Infosys,


What do you mean by teradata sql assistant?

0 Answers  


Why MLOAD needs Work Tables?

5 Answers   Teradata,


Why do Hash joins usually perform better than Merge Joins?

1 Answers  


Categories