Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: partition
On Feb 20, 4:37 pm, "James" <jwilk..._at_gmail.com> wrote:
> Hi,
>
> I have a view that joins two partitioned (range) tables. They have
> the same partition key - quarter of the year.
>
> The view looks like this:
> create view my_view as(
> select a.id, a.name, a.quarter, b.id, b.name, b.quarter
> from tab1 a, tab2 b
> where a.id = b.id(+) and a.quarter = b.quarter(+))
>
> And I am invoking the view like this:
> select * from my_view where quarter = 4
>
> Due to the outter join, Oracle always scans all 8 partitions from both
> tables. What do I have to do to get it to realize that I am only
> asking for the data of the forth quarter and use the proper
> partition? Thanks!
>
> James.
Have you tried specifying PARTITION clause in your query? Received on Tue Feb 20 2007 - 15:49:53 CST
![]() |
![]() |