start with in Oracle. How to optimize connect by prior?
an address table has a total of 8-level addresses. Pass in the address id, to query all the superior addresses. The code is
select address_id addressId,
address_name addressName,
address_level addressLevel
from rm_address t
start with t.address_id = -sharpvillageId-sharp
connect by t.address_id = PRIOR t.PARENT_ADDRESS_ID
order by address_level
now the query is very slow, how to optimize it? -sharp-sharp title text-sharp-sharp