Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using views inside a View
GreyBeard wrote:
> On Mon, 21 Feb 2005 17:54:58 +0100, Frank van Bortel wrote:
>
>
>
>>>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. >>> >> >>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...
No - I don't go that far; I'd like to change that to:
therefore selecting from nested views should only be done
with caution by knowledgeable developers.
>
> In some circumstances (such as publishing views to ad-hoc users) I can
> concur that data sources can be used inappropriately.
Meet Mr. Murphy! Mr. Murphy is an optimist.
>
> My take on that is it leads us into a philosophical, not technical,
> discussion (like the one about killers and guns), in which case I can
> agree with you.
>
> FGB
Inline...
-- Regards, Frank van BortelReceived on Mon Feb 21 2005 - 14:23:23 CST