Archives of the TeradataForum
Message Posted: Thu, 13 Dec 2001 @ 12:33:39 GMT
For an index on the date to be used the dates must be specified explicitly, that is not using between or > .
For a few dates that can be dynamically calculated I use the following :
... (tran_date = date or tran_date = date-1 or tran_date = date-2) ...
This uses an index, whereas ... tran_date between date-2 and date ... will perform a full-table scan.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|