Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Optimizing Queries Against UNIONed View
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.orgReceived on Tue Jan 23 2007 - 17:35:52 CST