|
|
Archives of the TeradataForum
Message Posted: Wed, 02 Aug 2006 @ 19:20:05 GMT
Subj: | | Re: Unique Primary Index Vs Non Unique Primary Index |
|
From: | | John Graas |
TeradataForum wrote:
| I am having some doubts in Unique Primary Indexes and Non - Unique Primary Indexes, for example, my database is having 2 amps and i am
inserting 100 records to a table, whether the record will be distributed in both the amps in both UPI & NUPI, then how the records will be
(inserted)distributed to the 2 amps in both Unique Primary Index and Non - Unique primary index. | |
Teradata distributes the rows to AMPs based on the hash value of the Primary Index (PI) of the table. If, in the above example, the PI has the
same column values -- no matter whether one defines the PI as Unique or Non-Unique -- then it will be distributed to the AMPs exactly the
same.
Uniqueness for the PI tells Teradata to not allow more than one row with the same PI values, and also tells the Teradata optimizer that only
one row can exist for a set of PI values. The latter comes in handy to help Teradata cost access plans for some queries.
jdg
www.jgraas.com
| |