| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Time fraction(6) with Oracle 9i on Windows NT
"Andy Hassall" <andy_at_andyh.co.uk> wrote in message
news:qi8kk0d3b3rig1jushhdgn9qc8ud43rmam_at_4ax.com...
> On Thu, 16 Sep 2004 15:35:45 GMT, Kenneth Koenraadt wrote:
>
> >>Can Oracle 9i generate microseconds for timestamp fields
> >>on Windows NT?
> >>
> >>I have a table with one timestamp field.
> >>Several inserts of CURRENT time gave following result:
> >> 2004-09-15-16.47.11.154000
> >
> >>May be there is some options that can affect this restriction?
> >
> >Not AFAIK. Oracle's timestamps are inherited from the O/S.
> >
> >Solution 1) : Move to a platform which doesn't suffer such problem,
> >e.g. Linux.
>
> Windows is capable of offering higher resolution time information; it
depends
> what function you use, and how recent your CPU is for the highest
resolution
> option.
>
> See this article:
> http://www.mvps.org/directx/articles/selecting_timer_functions.htm
>
Many peaces of our new code use QueryPerformanceFrequency function,
but there also a lot of old code, that does not use it,
and these code cannot be changed now.
We need to tune Oracle.
I still don't understand why Oracle cannot make such simple things?
Actually, I prefer to generate microsecond manually, using a
static counter, cause it is the best way to have a unique timestamp.
Using timestamp with microseconds is not a problem now,
cause rare business operation can be executed less then one
microsecond.
With processors performance increasing it can become a problem.
I honestly believe that it is bad to use timestamp as a unique index.
It is better to have a unique counter and the timestamp, in case a user wants
to know when an event happened. The user should also aware that two
values of the counter may have the same timestamp value.
> The always-available basic function (timeGetTime) is only millisecond
> resolution, so maybe Oracle have just gone for the lowest common
denominator
> solution.
>
> --
> Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Received on Fri Sep 17 2004 - 04:33:20 CDT
![]() |
![]() |