Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 02 Aug 2006 @ 19:20:05 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


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



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023