Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Efficiency of Procedures/Functions Over In-line Code ?
Thomas Kyte wrote:
>
clip
>
> I find calling pl/sql from SQL to be useful in typically 3 cases:
>
> 1.) I want to create a parameterized view. I will create a view that looks
> something like:
>
> create or replace view my_view
> as
> select * from some_table
> where some_column = ( select MY_FUNCTION from dual );
>
> What we did in this case was to make it such that MY_FUNCTION gets called ONCE
> per query instead of one per row per query. This is very fast and you don't
> even realize that you are calling pl/sql from sql.
>
clip
Thomas,
Could you go into this a little more. I'm not quite following what you are doing in this case.
Michael.
-- Michael A. Rothwell Oracle DBA/Web DeveloperReceived on Thu Dec 31 1998 - 00:00:00 CST