Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Mon, 09 Oct 2000 @ 08:22:28 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: Functions of dates!
From:   David Wellman


I agree with you that your code below is easier to understand (which usually brings benefits such as ease of support and modifications) it will typically be a lot slower than the other methods talked about here. This is because using this code (i.e. joining to the sys_calendar.calendar table) brings an extra table to the query and this table will be scanned (i.e. a full-table scan). Compared to the other examples where it's just a calculation.

Your idea of creating a table (with indexes and stats etc) may be a neat compromise to get the best of both worlds.

But as always, I suppose it's 'horses for courses'. Whatever fits best with your environment/situation is the best answer for you.



  <Prev Next>   <<First <Prev
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023