Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Using views inside a View

Re: Using views inside a View

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Mon, 21 Feb 2005 17:54:58 +0100
Message-ID: <cvd3l4$gmf$1@news2.zwoll1.ov.home.nl>


GreyBeard wrote:
> On Mon, 21 Feb 2005 11:35:20 +0100, Frank van Bortel wrote:
>
>

>>Well, there *is* a risk of getting queries with horrible
>>execution plans. So, even if it's ROTten, I'd like some
>>proof it won't harm, else no views over views as a ROT.
>>And by proof, I'd like to see explain plan, etc.

>
>
> Frank,
>
> Of course there is a risk of writing queries that have lousy execution
> plans. It seems to me that risk exists in 'plain' SQL as well as SQL
> based on nesting of views.
>
> However, I confess I don't quite understand ... are you asking someone
> else to do the analysis?
>
> FGB
No - I have the 'no views over views' as an Rule Of Thumb, unless good, proven reasons (explain!) are shown why, where and how.

The whole problem is that a view with columns A, B, C, and D and aggregates all over may look as just what I want when I want select A, sum(B) group by A, D, but give a horrible plan. This is not clear as it would be from the "plain SQL" you are referring to.

Especially when end-user ad hoc reporting tools are to be used...

-- 
Regards,
Frank van Bortel
Received on Mon Feb 21 2005 - 10:54:58 CST

Original text of this message

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