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 the primary index in teradata?
Why do you get spool space errors? How do trouble-shoot them?
How to cast date "2015-03-03-012204-000000" to timestamp
What is the purpose of joins in teradata and what are the available join types?
Is multi insert ansi standard?
Can we collect statistics on table level?
Explain the advantages of partitioned primary index in a query?
If table have access lock.In the same table write lock is posible or not?
Pls any body reply for this question. Which circumstance does the optimizing choose a product join? Thanks for advance
What are the components provided on node?
which option is used to restart the fastexport script ?
can we load 10 millions of records into target table by using tpump?