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: Partitioned views

Re: Partitioned views

From: Ronnie Doggart <rdoggart_at_netcomuk.co.uk>
Date: Wed, 03 Jun 1998 08:39:03 +0100
Message-ID: <3574FD97.ECC3895E@netcomuk.co.uk>


Hi Jan,

Changing the statement to what you suggest works and both views partition.

Can you explain why this works. Do you need to supply an absolute value for the contraint for the optimser to partition the view.

The SQL is actually being generated by Business Objects so I have very little control over what SQL get generated.

Regards
Ronnie

Jan H Malmberg wrote:

> Ronnie Doggart wrote in message <3573A264.90C3451E_at_netcomuk.co.uk>...
> >Hi All,
> >
> >I have a database where I have two partitioned views (view_a, view_b)
> >each doing a union all on 12 tables each and constrained using date. If
> >I do a:
> >
> >select * from view_a where date = '01-June-1998';
> >
> >Then view_a partitions OK.
> >
> >select * from view_b where date = '01-June-1998';
> >
> >Then view_b partitions OK.
> >
> >However if I issue the following query:
> >
> >select * from view_a, view_b where view_a.date = '01-June-1998' and
> >view_b.date = view_a.date and view_b.id = view_a.id;
> >
> >Then view_a partitions but view_b does not and preforms full table scans
> >on all tables.
> >
> >What am I doing wrong !
> >
> >Regards
> >Ron
> >
>
> Try
>
> select * from view_a, view_b
> where view_a.date = '01-June-1998'
> and view_b.date = '01-June-1998'
> and view_b.id = view_a.id;
>
> This will give the optimizer the necessary information.
>
> Jan
Received on Wed Jun 03 1998 - 02:39:03 CDT

Original text of this message

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