Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Which column should i select for Index creation - response (2) by Qaisar Aftab Kiani

$
0
0

The below query will give you some stats about the data distribution as how many rows will be landing on different amps... Execute the query with different column list, you surely will be able to choose the ones that are more appropriate...

SELECT HASHAMP(HASHBUCKET(HASHROW(<PI_COLUMN_LIST>))) AS "AMP#",COUNT(*)
FROM <TABLE_NAME>
GROUP BY 1
ORDER BY 2 DESC;

 

 


Viewing all articles
Browse latest Browse all 14773

Trending Articles