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
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 |
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 |
what is use of PI(primary index) AND SI(secondary index)
What is the default join strategy in Teradata???
TCS recently asked this question I have records like below Emp id Empname Salary DateTimestamp 1 AA 6000 20120609:11:30 1 AA 7000 20120609:12:30 1 AA 8000 20120609:01:30 I want to exceute records max timestamp(20120609:01:30)
Explain the term 'primary key' related to relational database management system?
Explain how spool space is used.
Explain Teradata performance tuning and optimization?
what is DYNAMIC SQL in TD?
Why do Hash joins usually perform better than Merge Joins?
If the table does not have duplicates then which utility you can suggest to load the data ?
Highlight the need for Performance Tuning.
During the Display time, how is the sequence generated by Teradata?
What is the command in bteq to check for session settings ?