Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 24 Jun 2009 @ 15:57:31 GMT


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


Subj:   Re: Indexing Intersection (association) tables
 
From:   Victor Sokovin

  I am looking for some feedback on indexing for intersection tables. Something like a, Student_Enrollment table, that is an intersection between a Student (PI - StudentID) table and a Course (PI - ClassID) table. Would I be better off with a combined Unique index of (StudentID, ClassID) OR a Non Unique PI of Student ID OR Course ID alone (to facilitate collocation/same amp join with either of these two tables) for the Student_Enrollment table. What are the factors to consider?  


I understand you mean what we call "join" of tables, not the "intersection", because intersecting students with courses should just produce an empty set, no?

If you really need the help of (N)PI for such a join then the StudentID NPI on the Enrollment table might be an idea as the Student table is potentially larger than the Course table (unless we study the education system during the financial crisis) so the benefit might be larger than otherwise. But the best thing is to experiment with the data. Perhaps you don't want to "waste" the NPI just on this particular join, which might be easy anyway, and "save" it for a rainy day with a harder join.


Victor



     
  <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