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: usage of views

Re: usage of views

From: Atta ur-Rehman <atta707_at_my-deja.com>
Date: 2000/03/15
Message-ID: <8an86j$49$1@nnrp1.deja.com>#1/1

hi ajay,

no, using a view instead of a plain sql statement doesn't have to run any slower. in fact, because the query definition of a view is stored in a parsed and compiled form, it would run faster 'cas you're saving the parsing time here. well, of course, if your view doesn't need to be recompiled for any reason, that is.

i look at a view as a 'stored query', a convinient of way of storing long, multi-table queries that need to be done pretty frequently. or a way of restrictng veiw of a table, or multiple joined tables, either horizantolly, vertically or both ways. the execution speed in this case takes the secondry importance, if at all.

regards,

:) ATTA In article <8an3fj$4j8s$1_at_newssvr03-int.news.prodigy.com>, "Madhuri Bannai" <bannai_at_prodigy.net> wrote:
>
> Hello,
>
> Will the usage of a view to substitute for a query make it run any
 faster ?
> If so, why ?
>
> For instance if I do a select
>
> select a.1, a.2, b.3, b.4
> from a, b
> where a.1 = b.1
> and a.2 = b.2;
>
> Instead I define a view
>
> create view xyz as select
> a.1, a.2, b.2, b.3, b.4
> from a, b
> where a.1 = b.1;
>
> and then do a select * from xyz where b.2 = 'some value';
>
> Does the second scenario make it run any faster ? My contention is
 that it
> should be slower. Any views, pointers welcome.
>
> TIA
>
> ajay
>
>

--
getting the meanin' of data...


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Mar 15 2000 - 00:00:00 CST

Original text of this message

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