Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 11 Jun 2003 @ 12:59:26 GMT


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


Subj:   Re: To Cover or not to Cover..
 
From:   Adam DeYoung

In general, the only costs you pay to add a secondary index to a table are the storage cost of the index subtable, the additional time it will take to complete loads to the tables, and time to collect stats on the new index. The presence of a secondary index will not have an adverse effect on queries that do not include the columns in the index - the query will parse as if the index were not there (as shown in the EXPLAIN).

In your specific case, the wording is unclear. It sounds like the ID column is already the primary index of both tables. If that's the case, how would it help adding a secondary index on the same column that makes up the primary index if you join the tables on the primary index column? The primary index of the table should already be ordered by hash on the ID column. Are you talking about creating a Join Index? Because that's a whole 'nother animal. Join Indexes have additional benefits and limitations that regular secondary indexes do not.

Adam
Advanced Teradata Certified Professional



     
  <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: 27 Dec 2016