Re: Real-Time Timestamps?
Date: 26 Nov 1993 04:56:39 GMT
Message-ID: <2d42a7$h2f_at_crcnis1.unl.edu>
davidm_at_consilium.com (David S. Masterson) writes:
:If I understand Oracle correctly, the Date/Time type only supports time down
:to the seconds. So my question is how do people handle finer-grain times (say
:down to hundredths of seconds). For instance, in a manufacturing environment,
:many things could happen within the space of a second, but the history of what
:happens may be kept for years. Do people put timestamps on database records
:using two columns (one for a standard Date/Time type and one for parts of a
:second)? Doesn't this make the data harder to refer to (or index)?
If finer granularity is needed, I would use a sequence in the second column, it guarantees a consistent order, even hundreths of a second would allow duplicates. Also, since the sequence is unique, you can refer to it alone for indexing and only use the timestamp only when needed to reference the time of day. (I use this method in an A/R system, where the batch posting from another system results in dozens of records having the same timestamp each morning.)
One of the problems with a multi-platform product like Oracle is that it can't GUARANTEE a particular time interval across platforms. For example, I've used at least one computer that only updated the system clock every two seconds. (That was an older system, I don't think I've seen any recently that were worse than one second intervals.)
--- Michael Nolan, Sysop for the DBMS RoundTable on GEnie nolan_at_notes.tssi.com, dbms_at_genie.geis.com (posted from nolan_at_helios.unl.edu)Received on Fri Nov 26 1993 - 05:56:39 CET