Archives of the TeradataForum
Message Posted: Mon, 09 Oct 2000 @ 08:22:28 GMT
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.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|