Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 05 Jan 2001 @ 01:24:20 GMT


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


Subj:   Re: System Calendar
 
From:   Sam Mosley

Warren,

Although I have not attempted to create such a view I would suggest you create a physical table instead, for performance reasons. The system calendar is itself a view of a view of a view of a table containing one column. Each view adds derived columns. If you simply go to that view it performs quite well. If you join it to other tables it usually doesn't perform too well. And, since it's only a single column you can't collect statistics on the derived columns or create indexes to improve performance for your joins. If, however, you create a table containing all the columns from the system calendar view, and add the derived columns you want, you will be able to create appropriate indexes, and collect statistics. This will improve your performance to acceptable levels. There are also some tricky things you can do in date arithmetic to calculate n weeks into a period which perform well, but a phsyical system date table is much more understandable and maintainable.

Just a few thoughts.

Have a great day.

Sam Mosley
President
VLDB Systems, Inc.



     
  <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