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: Jusung Yang <JusungYang_at_yahoo.com>
Date: 19 Jun 2003 07:09:28 -0700
Message-ID: <130ba93a.0306190609.5fee129c@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

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.

Received on Thu Jun 19 2003 - 09:09:28 CDT

Original text of this message

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