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: Performance issue

Re: Performance issue

From: Allen Kirby <akirby_at_att.com>
Date: 1998/01/12
Message-ID: <34BA35B1.1877@att.com>#1/1

Peter McKenzie wrote:
>
> Oracle 7.3.....
>
> I have two tables - 'A' and 'B' with identical structures. Both are indexed
> on column X.
>
> I have a view 'C' = select * from A union all select * from B.
>
> If I select * from 'C' where X='a value'
> the index on column X is not used (no index is used)
>
> I have tried using hints and various other tricks but Oracle refuses to use
> the index.
>
> Any ideas welcome
>
> Thanks,
> Peter

Try this:

select * from A where X = 'a value'
union all
select * from B where X = 'a value';

This should use both indexes.

-- 
Allen Kirby			
AT&T Information Technology Services
Alpharetta, GA.
The views expressed here are mine, not my employers.
Received on Mon Jan 12 1998 - 00:00:00 CST

Original text of this message

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