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
Probably depends. The optimizer may not do what you think it does in handling views. It can tranform the query by "merging" views or "pushing predicates". To be sure, run explain plan on both cases and compare.
![]() |
![]() |