Archives of the TeradataForum
Message Posted: Thu, 12 Jun 2008 @ 21:57:57 GMT
| Subj: || || Re: Timestamp & six digit second |
| From: || || Dieter Noeth |
Michael Larkins wrote:
| ||I re-read the manual for TD 12 and it specifies the minimum value as .000000 and the maximum as .999999. There is even an example that
uses the value of: '1999-01-01 23:59:59.999999' for exported data on page 126. On page 130 there is another example referencing time zone with
this example: '11:37:58.123456+08:00'. This makes the manual a bit misleading where the max value according to your reading .990000.|| |
You're confusing the datatype TIMESTAMP and the function CURRENT_TIMESTAMP. The datatype might store up to a 1/1.000.000 of a second, if
provided, but the built-in function is returning only up to a 1/100 of a second.
You just need your OLTP-system running on a real-time OS to provide a greater accuracy, but who cares about that in a Warehouse?
| ||I don't remember what a V2R6 demo version returns, but I just did some more testing on a TD 12 demo version on XP and 5 times in a
row everything after the decimal point was .000000 for timestamp(6). So either TD 12 is less precise, or the OS (Windows vs UNIX) makes a
difference too. My guess would be the OS instead of changes within Teradata.|| |
Could you post that testing and output, i couldn't reproduce it.
| ||Here is my question: Since Teradata is not currently using the decimal places after two, do you know if the storage allocated for
timestamp(0) and timestamp(6) are actually the same? Or is disk space wasted when you specify timestamp(6)?|| |
A TIMESTAMP needs 10 bytes on 32-bit and 12 bytes on 64-bit regardless of the fractional digits.