Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 04 Apr 2002 @ 14:54:25 GMT


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


Subj:   Re: On Join Index Creation
 
From:   Claybourne L. Barrineau

Since you haven't specified a Primary Index, Teradata is probably defaulting the first column ('t1.a') of your select statement as the Primary Index. Teradata cannot create a primary index for a column name which is prefixed by a table tablename; therefore, you will need to create an alias for 't1.a' and then reference that alias in the definition of your primary index.

For example:

create join index ji
as sel (t1.a as AA,t2.b),(t1.b,t2.a) from t1,t2
where t1.a = t2.a
Primary Index (AA);

Something to consider. The above JI format is intended for compressed Join Indexes. You might want to consider a non-compressed Join index definition. For example;

create join index ji
as
sel t1.a as AA,t2.b,t1.b,t2.a
from t1,t2
where t1.a = t2.a
Primary Index (AA);


Hope this helps!

Claybourne Barrineau



     
  <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