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: Why functions in Select Clause affect performance?

Re: Why functions in Select Clause affect performance?

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 04 Apr 2006 12:46:41 -0700
Message-ID: <1144180001.413360@yasure.drizzle.com>


Kin wrote:
> I have a SQL statement that uses a user defined function like this
>
> select f(a.a, b.b, c.c)
> from a, b, c
> where ...
>
> This statement took about 50 minutes (not seconds) to return the
> result.
>
> If I changed the SQL statment slightly like the following:
>
> select f(a_a,b_b,c_c)
> from
> (
> select a.a as a_a, b.b as b_b, c.c as c_c
> from a, b, c
> where ...
> )
>
> Then it will return results in 20 seconds.
>
> What puzzles me is it seems the functions in the Select clause are NOT
> always run against the final result set but some intermediate ones.
>
> Can someone explain the reasons why Oracle is doing that?
>
> Thanks

Without version number and Explain Plan it is impossible to tell what is actually happening.

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Tue Apr 04 2006 - 14:46:41 CDT

Original text of this message

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