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: Oracle & Views

Re: Oracle & Views

From: <dean.reynolds_at_home.net>
Date: Fri, 26 Mar 1999 02:45:15 GMT
Message-ID: <36faf3b7.11328819@news>


Keep in mind that a VIEW is nothing more than a SQL statement. Their main purpose is to make querying the data easier.

Instead of having to type

	select a.one,b.two,c.three,d.four from qwerty a, uiop b,
	asdf c, ghjkl d
	where a.two-b.two and c.three<> d.six

You save that as a view and from then on type

        select * from my_view

DON'T let people trick you into thinking that views offer better performance. If you design and use them right, they can. More often than not, they are poorly designed or people forget that they are VIEWS and not TABLES. I had someone create several views comprising several joins. By the time they got thru with it, it took over nine minutes to return 106 rows!

Unless your comfortable with SQL tuning, I would use views to make queries easier, not better performing.

Oh, the people who say views will perform faster because they are preparsed queries always seem to forget that views are usually used in ad-hoc queries that have to be parsed to see if they can be integrated with the view query!

-Dean

On Wed, 24 Mar 1999 10:47:58 -0800, Vitaliy Mogilevskiy <vit100gain_at_earthlink.net> wrote:

>Views are GOOD, they are stored select's on the server side
>Use them !
>
>Vitaliy Mogilevskiy
>
>
>Andrew Thomas wrote:
>
>> In the couple of books that I have, I'm having trouble locating much useful
>> information about views. I'm wondering how much resource a view would take.
>> Does it just create a 'filter' for the data? I have a table of 1.7 million
>> rows and I'm wondering what affect it will have on the system if I create
>> 200 views? Is there a better way to do this?
>>
>> Please respond via email to athomas_at_iminformation.com if at all possible.
>>
>> Thanks,
>> -Andrew Thomas-
>
>
Received on Thu Mar 25 1999 - 20:45:15 CST

Original text of this message

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