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

Home -> Community -> Usenet -> c.d.o.server -> Re: about SYSDATE function

Re: about SYSDATE function

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Sun, 1 Apr 2001 17:22:32 +0100
Message-ID: <986141963.20943.0.nnrp-08.9e984b29@news.demon.co.uk>

Interesting, but the following is in the 8.1.7 standard.sql as part of the package body:

And this is from a system that has just been upgraded to 8.1.7.1 - and I've just run;

alter sessions set sql_trace true;
declare

    m_date date;
begin

    m_date := sysdate;
end;

and found
SELECT SYSDATE FROM SYS.DUAL in the trace file.

(It'll be nice when it is corrected - there is a webserver system I support where the most expensive statement is SELECT SYSDATE FROM DUAL, and the second is SELECT USER FROM DUAL).

--
Jonathan Lewis
Yet another Oracle-related web site:  http://www.jlcomp.demon.co.uk

Practical Oracle 8i:  Building Efficient Databases
Publishers:  Addison-Wesley

Reviews at: http://www.jlcomp.demon.co.uk/book_rev.html



Connor McDonald wrote in message <3AC6EB9A.606E_at_yahoo.com>...

>
>Found this in the patch note for 8.1.7.1
>
>"This performance regression was introduced with the fix in Bug:616870.
>With this fix calling SYSDATE from PL/SQL is much slower as SYSDATE
>is obtained by selecting from DUAL.
>This fix restores server side performance by allowing server side PLSQL
>to use internal calls rather than selecting from DUAL."
>
Received on Sun Apr 01 2001 - 11:22:32 CDT

Original text of this message

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