Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 28 Feb 2007 @ 12:46:43 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Problem Returning Time
 
From:   Dieter Noeth

Victor Sokovin wrote:

  I heard that could be because the nodes have a different time. Could I get the right time without modifying the time in all nodes??  


Define "right time"


  Interesting question! NCR acknowledge the fact that you cannot expect clock synchronization across nodes (MPP feature / vulnerability, depending on the point of view).  


I don't know exactly, but if NTP (network time protocol) is implemented:

"NTPv4 can usually maintain time to within 10 milliseconds (1/100 s) over the public Internet, and can achieve accuracies of 200 microseconds (1/5000 s) or better in local area networks under ideal conditions."

en.wikipedia.org/wiki/Network_Time_Protocol


A timestamp supplied by Teradata supports only 1/100 of a second, so NTP should result in the same time across nodes, at least in most cases :-)


  One of the consequences is that the queue mechanism in Teradata is not exactly FIFO if you don't take special care about it.  


  I don't know how exactly "sel current_timestamp" is routed to a particular node. Perhaps in the same way as any other query is (worth checking, though).  


It depends on the PE/node of your session.


  Suppose it is the case. If you need absolute consistency in timestamps and would rather rely on one node's clock you might experiment with query routing by running those "sel current_timestamp" under a special user all requests of which are forwarded to one (and the same) node.  


Ack.

And if you want an order for Insert/Selects into a queue table, you have

to use "current_timestamp + rank() over (...) * interval '0.000001' second"


Dieter



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