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: Calculation fields - views versus cursors

Re: Calculation fields - views versus cursors

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 19 Jun 2003 08:58:21 -0700
Message-ID: <92eeeff0.0306190758.7797240e@posting.google.com>


"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

Original text of this message

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