Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 11 Jul 2004 @ 09:08:09 GMT


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


Subj:   Re: Performance of query which does weekly aggregates
 
From:   Robert Doss

Manish,

After a quick look at this - here is one things I would try - It looks like VCCART_LOADFCTR.reporttime is not a Teradata date datatype. If it is an option to make it a Teradata date then you could create a value ordered secondary index on this column (see the SQL Manual) and collect statistics on it. Look at the explains and see if the index is used. If it is not, you might adjust the WHERE clause to have something close to a direct range constraint against the indexed column - that is, remove the CAST and perhaps restate or reiterate it as a BETWEEN statement. Of course the use of the index is dependent on the demographics of the column values and the size of the table. If it is a small table and/or not very many values of the column the index is very unlikely to be used in any case cause the optimiser will decide (probably correctly) that it won't help.


Hope this helps.

Bob Doss
Spirit Lake Consulting Pty. Ltd.



     
  <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