OK, Don't get me wrong, I have no basis for the theory as I did no
research.
However, your results don't discount my theory that the times are
processed through the CPU sequentially. What it proves is that you
cannot depend on the order that they are selected. :)
Actually, I suspect something else is going on.
Joel Patterson
Database Administrator
joel.[Email address protected]
x72546
904 727-2546
-----Original Message-----
From: Vikas Sangar
[mailto:oracledba-ezmlmshield-x65248527.[Email address protected]
Sent: Wednesday, January 31, 2007 12:48 AM
To: LazyDBA Discussion
Subject: RE: CURRENT_TIMESTAMP vs GETDATE
Hi Joel,
May be you are right but I doubt because if, had they been processed
sequentially, The output shown for the systimestamp in your first query
would have been greater/more than that of current_timestamp, Since
systimestamp comes after current_timestamp.
just check out this query and see for yourself. It seems that sequential
processing stuff does'nt seems to work.
select current_timestamp a1, systimestamp a2, current_timestamp b1,
systimestamp b2 from dual;
A1
-----------------------------------
31-JAN-07 11.04.48.859646 AM +05:30
A2
-----------------------------------
31-JAN-07 11.04.48.859635 AM +05:30
B1
-----------------------------------
31-JAN-07 11.04.48.859646 AM +05:30
B2
-----------------------------------
31-JAN-07 11.04.48.859635 AM +05:30
Regards...
Vikas.
Original Message -----------------------
Between sysdate (getdate()) and timestamp, I would think is because the
timestamp has timezone information in it. And date does not.
----
Hmmm, on my system they are also different, but only by millionths of a
second, which to me suggests they went to the CPU sequentially:
Notice that the last column has the latest time.
DBMON @ mqaudit> select current_timestamp, systimestamp from dual;
CURRENT_TIMESTAMP
SYSTIMESTAMP
------------------------------------------------------------------------
--- ------------------------
30-JAN-07 09.42.16.692385 AM -05:00
30-JAN-07 09.42.16.692312 AM -05:00
DBMON @ mqaudit> select systimestamp, current_timestamp from dual;
SYSTIMESTAMP
CURRENT_TIMESTAMP
------------------------------------------------------------------------
--- ------------------------
30-JAN-07 09.42.25.328189 AM -05:00
30-JAN-07 09.42.25.328254 AM -05:00
Joel Patterson
Database Administrator
joel.[Email address protected]
x72546
904 727-2546
-----Original Message-----
From: Vikas Sangar
[mailto:oracledba-ezmlmshield-x73291322.[Email address protected]
Sent: Tuesday, January 30, 2007 4:06 AM
To: LazyDBA Discussion
Subject: RE: CURRENT_TIMESTAMP vs GETDATE
Well, I dont know whats the intended use of Getdate().
But in Oracle 9i,
select current_timestamp, systimestamp from dual;
gives you almost the same results.But which one is more accurate has yet
to be discovered.
regards.
Original Message -----------------------
I get the same results?
select current_timestamp, getdate()
----------------------- -----------------------
2007-01-29 11:25:35.580 2007-01-29 11:25:35.580
(1 row(s) affected)
-----Original Message-----
From: Taylor Jay
[mailto:oracledba-ezmlmshield-x31449968.[Email address protected]
Sent: Monday, January 29, 2007 9:35 AM
To: LazyDBA Discussion
Subject: CURRENT_TIMESTAMP vs GETDATE
Can anyone provide some insight into why these two commands would return
different values. We did some testing of the patches on the new day
light savings time schedule this weekend. During the testing it was
brought to light that these two commands were returning different
values. Formatting aside, they were different. Should these not return
that same data and time?
Thanks in advance for any explanation.
Cheers-
Jay
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.
Douglas County, Oregon
www.co.douglas.or.us
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page