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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored function question

Re: Stored function question

From: PMG <pete_g_at_2xtreme.net>
Date: Thu, 13 May 1999 03:51:54 GMT
Message-ID: <373A4CE4.9F2C1803@2xtreme.net>


Thank you all for your replies.

My intent was to centralize business logic on the back end so that all front-end tools would be accessing the same definition of "Preferred Customer". Since I would have to pass all relevant fields as IN parameters to the function, and since the definition can change over time, as well as the point about the indexes, it looks like the best solution is to just create a view of Preferred Customers, and forget about the function.

Thanks again

rtproffitt_at_my-dejanews.com wrote:

> Since the item in the where clause would be a stored function returning
> boolean, you would have to pass it everything it needs to return and answer,
> such as:
> Function Is_Preferred_Customer (field1, field2, field3....etc)
> return Boolean as
> .....if field1='a', etc......
> return TRUE.
>
> Remember that the where clause will be executed for every row of customers,
> and will be slower that raw SQL. There will also be no opportunity for
> optimizer to look for indexes on various fields since they are now buried in
> the function call.
>
> Robert Proffitt
> Beckman Coulter
> Brea California
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---
Received on Wed May 12 1999 - 22:51:54 CDT

Original text of this message

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