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: with/inline view efficiency question

Re: with/inline view efficiency question

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 10 Jan 2006 11:29:59 -0700
Message-ID: <43c40b37$1@news.victoria.tc.ca>


Mark D Powell (Mark.Powell_at_eds.com) wrote:
: Malcolm, a WITH clause is really best used when the result of the WITH
: query is required more than one time in the body of the query such as
: where one averaged value needs to be compared against two or three
: times.

: I think in your example what you want is to try coding the query as an
: inline view rather than as a scalar query (select list query) or as a
: WITH.

: select a.col1, a.col2, b.col3
: from (select ... from the_values group by the_group) b,
: table_a a
: where b.the_group = a.the_group

(of course, how do these differences escape my mind!)

: Obviously, the best way to make you choice is to code all three
: versions and time test them multiple times. But based on experience
: and the Oracle version the CBO does not seem to do as good as job
: optimizing with select list queries as it does with inline views.

: HTH -- Mark D Powell --

thanks Received on Tue Jan 10 2006 - 12:29:59 CST

Original text of this message

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