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: Optimizing Queries Against UNIONed View

Re: Optimizing Queries Against UNIONed View

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 23 Jan 2007 15:35:52 -0800
Message-ID: <1169595347.348303@bubbleator.drizzle.com>


Valentin Minzatu wrote:
> I do not think you can stop accessing both tables, but I do not see why
> it would do FTS on any of them - I tried your scenario and it does use
> indexes on both tables. The only way I can think of not to access both
> tables would be to use list partitioning, but that is an option to the
> enterprise edition (additional money for the license).

I can't find or recall the original query but just making hopefully reasonable assumptions it should access both tables ... but not necessarily both indexes.

It depends on what the optimizer assumes to be the cost. Hint the table, run an explain plan, and see why the optimizer thinks is the cost of using the index.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Jan 23 2007 - 17:35:52 CST

Original text of this message

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