Sunday, October 23, 2016

What is the difference between Primary key and primary Index in Teardata?

Primary Key:
----------------
1) Should be Unique and not null.
2) Mainly used for Referential Integrity.
3) While creating table only primary key is mentioned and there is no primary index mentioned .Instead of first column the primary key column will be taken as unique Index.


Primary Index:
------------------
1) Could be Unique or Non Unique
2) Mainly used for Data Distribution and Data retrieval in Teradata.
3) Null values are allowed
4) Choosing wrong primary index leads to data skew/Amp Skew.

No comments:

Post a Comment

Identifying Teradata table skew query

SAMPLE TABLE SKEW IDENTIFYING QUERY:  Lock Dbc.TableSize For Access  Lock Dbc.tables For Access  SELECT B.databasename , B.TableName , A.Las...