PK VS PI in TD

Published on December 2016 | Categories: Documents | Downloads: 33 | Comments: 0 | Views: 163
of 1
Download PDF   Embed   Report

Comments

Content

What is difference between Primary Key and Primary Index?
Primary Key
Primary Index
Logical concept of data modeling
Physical mechanism for access and
stroge
Terada doesn’t need to recognize
Each table must have exactly one
No Limit on column no.
64- column limit
Documented in data model
Defined in CREATE TABLE statement
Uniquely identifies each row
Used to place and locate each row on an
AMP
Values should not change
Values may be changed (Del+Ins)
Must be not NULL
May be NULL
Does not imply an access path
Defines most efficient access path
Chosen for logical correctness
Chosen for physical performance
What is Hashing Algorithms?
- When the primary index value of a row is input to the hashing algorithm,
then the output is called the “row hash”. Row hash is the logical storage
address of the row, and identifies the amp of the row.
What is Hash value
- Hash value determine in which AMP the row will reside and it always attached
along with the ROW to make it a UNIQUE identification for the ROW.
What is HashMAP
- HASHMAP contains the different bucket called as Hash Map Buckets,
distributed along the rows and columns.
What is HashBucket
- Hash Buckets contain only the different AMP number which is attached with
the TD system.
What is hashcollision
- This occurs when there is same hash value generated for two different
Primary Index Values.
- To handle hash collision increase the contrast between the two column
values, if your input column is char then try to change the values to
alphanumeric to get more contrast in values.
• What is skew factor?
- Skew Factor refers to the row distribution of table among the AMPs. If the
data is highly skewed, it means some AMPs are having more rows and some
very less. Means data is not evenly distributed. It affects the Teradata's
performance. The data distribution or skewness can be controlled by
choosing indexes.
• If your Skew factor is going up. What are remedies?
We will create new index which will have less skew factor

Sponsor Documents

Or use your account on DocShare.tips

Hide

Forgot your password?

Or register your new account on DocShare.tips

Hide

Lost your password? Please enter your email address. You will receive a link to create a new password.

Back to log-in

Close