Archives of the TeradataForum
Message Posted: Wed, 11 Apr 2001 @ 16:23:53 GMT
Subj: | | Re: Move of system data from Teradata to Access |
|
From: | | Mark Landry |
For reference this query runs in about 4 sec on our small (32 node) Teradata system.
Try bypassing the view:
select ((100 * ((4 * nullifzero(DBASE.PasswordChgDate) - 1) / 146097)
+ (4 * (((4 * DBASE.PasswordChgDate - 1) MOD 146097) / 4)
+ 3) / 1461 - 1900) + ((5 * (((4 * (((4 * DBASE.PasswordChgDate
- 1) MOD 146097) / 4) + 3) MOD 1461 + 4) / 4) - 3) / 153 + 2)
/ 12) * 10000 + (((5 * (((4 * (((4 * DBASE.PasswordChgDate - 1)
MOD 146097) / 4) + 3) MOD 1461 + 4) / 4) - 3) / 153 + 2) MOD 12
+ 1) * 100 + ((5 * (((4 * (((4 * DBASE.PasswordChgDate - 1) MOD
146097) / 4) + 3) MOD 1461 + 4) / 4) - 3) MOD 153 +5) / 5
(date, format 'yy/mm/dd', Named PasswordChgDate)
from dbc.dbase where databasenamei = 'test2';
Does this run any faster?
|