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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Cache on sysdate? --From 9i performance planning manual

RE: Cache on sysdate? --From 9i performance planning manual

From: Tim Gorman <tim_at_sagelogix.com>
Date: Thu, 26 Dec 2002 09:58:47 -0800
Message-ID: <F001.00522575.20021226095847@fatcity.com>


In PL/SQL, every statement which references SYSDATE or USER or USERENV or similar functions (such as your second suggestion) is automatically translated into an individual SELECT xxx FROM DUAL statement, behind the scenes.

You don't have a choice. Call it a weakness of PL/SQL...

>
> Can someone please explain me why you have to use
>
> select sysdate
> from dual
> /
>
> when
>
> my_date_Var := sysdate;
>
> just works fine? Maybe I am clueless ... but I can take an
> explanation
> Raj
> ______________________________________________________
> Rajendra Jamadagni MIS, ESPN Inc.
> Rajendra dot Jamadagni at ESPN dot com
> Any opinion expressed here is personal and doesn't reflect
> that of ESPN Inc.
> QOTD: Any clod can have facts, but having an opinion is an
> art!
> [Attachment: ESPN_Disclaimer.txt]

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tim Gorman
  INET: tim_at_sagelogix.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Dec 26 2002 - 11:58:47 CST

Original text of this message

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