Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Creating IDs subsequently

Re: Creating IDs subsequently

From: Ed prochak <ed.prochak_at_magicinterface.com>
Date: 25 Jul 2003 12:02:20 -0700
Message-ID: <4b5394b2.0307251102.738327af@posting.google.com>


andrewst <member14183_at_dbforums.com> wrote in message news:<3143009.1058968223_at_dbforums.com>...
> Originally posted by Ed Prochak
> > If you think the DATE data type only contains the date information and
> > not the time, then you are mistaken. The DATE data type records time
> > differences down to (IIRC) about 100milliseconds. Or are you saying
> > your data is chronologically closer than that?
> >
> Actually, DATE precision is only down to 1 second, no fractional
> seconds. So DATE can only be used as a unique key if you are
> generating one record per second, or less frequently than that.
> TIMESTAMP goes down to fractional seconds, but Gerd has already said he
> doesn't have Oracle 9.

It is true that you cannot specify a format string to anything closer than one second. But I understood that internally, ORACLE used (and stored) the date value down to a fraction of a second. With 7bytes for a DATE, there is certainly enough bits.

I'm assuming the value is loaded into the table using SYSDATE, and that the additional resolution is available on the host operating system time function.

If my assumptions are correct, even though you cannot print that fractional seconds, it would be possible to sort by them. My assumptions may be based on old (maybe it's in version 7 docs?) information so I certainly can be wrong.

BUT even if I am wrong about the fractional seconds, that does not make my basic observation wrong. Sort by the date and assign the sequential ID numbers. If the dates only go down to a resolution of seconds then it still doesn't matter as far as assigning the sequence values go. This gets him the sequence numbers for his past (already loaded) data. He can then apply sequence numbers to track the order of records loaded from now on. Received on Fri Jul 25 2003 - 14:02:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US