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

Auto select on PI - response (1) by Qaisar Aftab Kiani

$
0
0

The PI once created on a table can't be changed simply. You will have to create a copy of the table with a different PI, insert the data in the second table, delete the base table and rename the second table to the base table. And especially if the table is huge then this might not be a simple operation.
I think you might know the below query as how to analyze the PI choices for a table for better distribution

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



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>