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: Wait a Minute! RE:A technical question about VIEWS

Re: Wait a Minute! RE:A technical question about VIEWS

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/04/14
Message-ID: <33533d8f.2635439@newshost>#1/1

On Mon, 14 Apr 1997 00:52:05 GMT, keystrk_at_feist.com (Keystroke) wrote:

>On 13 Apr 1997 17:15:29 GMT, "Olen" <orkline_at_txdirect.net> wrote:
>
>>The view's query is not dynamic, you are building an intermediate table. A
>>view reacts like a subquery. It always
>>returns the same solution set regardless of what else you specify in the
>>query. So the answer is that Oracle will first create the view will 10,000
>>rows. Then process the rest of the query against it.
>>
>> That's how I understand it.
>
>Wait a minute! I am a fan of Oracle, but this doesn't make sense!
>How can _ANY_ DBMS make a claim to be production-worthy and _NOT_ take
>into consideration the rest of a query when a view is used in a query
>when building the first result set? How else can it know how to
>optimize the comepete querry?
>

This is not the way it happens. Please see the "Oracle7 Server Tuning" manual, chapter 5 for an overview of how views are optimized. They are completely dynamic and optimized at run time as you would expect.

Many views will be 'merged' into the original query that accessed the view (as though the view had not be used at all). Other views cannot be processed this way ( views with group bys, other aggregates, distincts, unions, etcs).

>Or is it just taken for granted that Oracle is a sub-optimized DBMS
>when it comes to using views?
>
>What am I missing here? (I am a former MainFrame DBA, if it helps you
>to see where I am comming from.)
>
>

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Mon Apr 14 1997 - 00:00:00 CDT

Original text of this message

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