Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Calculation fields - views versus cursors
"Iain Brown" <iain.brown_at_uk.thalesgroup.com> wrote in message news:<bcrutk$nrp$1_at_rdel.co.uk>...
> In the case where a stored procedure uses a cursor which uses a view, and
> one of the values needed by the procedure is the cursor is a complex
> calcuation of the view's fields.
>
> I was wondering if it was more efficient to do the calculation in the view
> definition or the cursor def.
>
> The procedure isn't called that often, perhaps hourly.
>
> Hope you can help,
>
> Iain
View is nothing more then a stored query. Any calculations perfomed in the view definition will be executed when a view is queried. Any calculations performed in a procedure will be executed when a procedure is called.
So it should be same performance wise. However, I would perform the calculations in a procedure thus keeping the view more generic for other queries.
Regards
/Rauf Sarwar
Received on Thu Jun 19 2003 - 10:58:21 CDT
![]() |
![]() |