Re: How does oracle evaluate where clauses?

From: Wayne McKinney <wayne.mckinney_at_tempora.com>
Date: Fri, 4 Jun 1999 12:56:19 -0700
Message-ID: <7j942f$2dgq$1_at_news.hal-pc.org>


[Quoted] My experience shows that SYSDATE is evaluated only once. That's why I frequently have to use syntax like

[Quoted]       where trunc(fielda) = trunc(sysdate)

Using the TRUNC function strips the seconds, minutes, hours, etc., off of the date and allows you to only compare the dates. If you don't care about the time, then this is the way to go.

Jonathan M Whitehead wrote in message <37579765.28314A8C_at_sheffield.ac.uk>...
>Hi,
>
>Can anybody tell me how oracle would evaluate the following simple where
>clause in this select statement:
>
>select fielda
>from tablea
>where fielda = sysdate;
>
>Does oracle evaluate sysdate once for the where clause and then use that
>value to compare with each row or does it evaluate the value of sysdate
>for every row returned by the select?
>
>Cheers,
>
>Jon.
>
Received on Fri Jun 04 1999 - 21:56:19 CEST

Original text of this message