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: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1997/03/28
Message-ID: <5hgqpe$5f6@info.csufresno.edu>#1/1

In article <01bc3b0a$18f125a0$43cf87d0_at_kwhitake.jic.om>, Ken Whitaker <kwhitake_at_moon.jic.com> wrote:
>Have an interesting problem,
>
>select count(*) from table1; 2mins ~1 millon rows
>select count(*) from table2; 1min 10 sec ~500,000 rows
>view #1 select * from table1 union select * from table2
>select count(*) from view#1; 10mins ~1.5 Millons rows
>view #2 select * from table1 union all select * from table2
>select count(*) from view#2; 7mins ~1.5 Millons rows
>Well one may conclude the sga too small etc; both tables inserted into a
>big one.
>
>select count(*) from tab#1_tab#2; 3mins ~1.5 millon rows
>Any one have any thoughts on views (Oracle 7.2.3 HPUX 9.x)
>kwhitake_at_moon.jic.com

View #1 takes longer than view #2 because union all gives you all rows, while union requires looking for and removing duplicate rows.

Steve Cosner Received on Fri Mar 28 1997 - 00:00:00 CST

Original text of this message

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