Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: hierarchical query + outer join performance problems
Cris Carampa wrote:
> How can I avoid the FTS on MPR? I tried to create an index on the joined
> columns but the optimizer seem to ignore it.
I solved the problem by putting the hierarchical query in an inline view and then outer-joining it with LOT table:
select
rownum,
mpr.piva_produttore, mpr.lotto_spedizione_id, mpr.lotto_spedizione_id_fornitore, mpr.lvl, mpr.piva_fornitore,
(
select level as lvl, mpr0.* from materie_prime_lotti_spedizione mpr0 start with mpr0.piva_produttore = '*SAL-DEMO-1' and mpr0.lotto_spedizione_id = '*LOTTO-DEMO-TPS-2' and mpr0.prodotto_id = 'TPS0213' connect by mpr0.piva_produttore = prior mpr0.piva_fornitore and mpr0.lotto_spedizione_id = prior mpr0.lotto_spedizione_id_fornitore and mpr0.prodotto_id = prior mpr0.prodotto_id_materia_prima ) mpr,
lot.piva_produttore(+) = mpr.piva_fornitore and lot.lotto_spedizione_id(+) = mpr.lotto_spedizione_id_fornitore and lot.prodotto_id(+) = mpr.prodotto_id_materia_prima;
SQL> @q4
4 rows selected.
Elapsed: 00:00:00.00
Kind regards,
-- Cris Carampa (cris119_at_operamail.com) "E` evidente che siamo di fronte allo sfruttamento opportunistico di quella quota di astensioni fatalmente derivanti da disinteresse o indifferenza." (Gustavo Zagrebelsky)Received on Wed Jul 06 2005 - 07:14:45 CDT
![]() |
![]() |