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

Re: Views

From: <argosy22_at_my-deja.com>
Date: Fri, 17 Dec 1999 17:36:10 GMT
Message-ID: <83dsa9$1jl$1@nnrp1.deja.com>


Hi,

> create view TheBigView as
> select V1.T1Oid, V1.x1, ... V2.y1, V2.y2, ... VM.z1, VM.z2, ....
> from V1, V2, ... VM
> where (V1.T1Oid = V2.T1Oid (+)) and
> (V1.T1Oid = V3.T1Oid (+)) and ....
> (V1.T1Oid = VM.T1Oid (+));
>
> My question is quite simple : If I do the following select :
>
> "select * from TheBigView where Vn.f10 = 567"

Do a describe on the view name to see what the actual field name will be.

> Is the first level of view (V1, V2, .. VM) using indexes defined on
> tables ? I think yes. Am I wrong ?
>
> Is TheBigView using indexes defined on the basis tables ?

Views are multi-user, multi-tasking.

I think that you are trying to decide whether or not to use the view, or the tables.

Set timing on
set feedback on
and query the view, and then query the tables and see which takes longer.

Use where clauses to filter the data.

As I understand, the problem with views from views is that the whole join/select is created first. Then, any where clauses used with the view are then initiated. ie: Select

     from view
     where ....

So, if you only want a small subset of the whole set of rows, it could very well be much faster to Select directly from the table, using the same where clauses, than to select from the view.

Good luck,

Argosy

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Dec 17 1999 - 11:36:10 CST

Original text of this message

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