If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

FROM MAM_ASSETS A
11 WHERE ((A.ACL_ID=65536) AND
12 (A.ASSET_GROUP_XID=120) AND
13 (A.IS_CURRENT_VERSION=1) AND
14 A.ID IN ( SELECT A.ID ASSET_ID FROM MAM_ASSETS A
15 WHERE (A.ID IN (SELECT SV65539.ID FROM MAM_ATTR_STRING_VALUES SV65539

1. I don't have toad. Any other way, I can find out where the time is consumed.
2. There is a UI based query wizard at the application level that generates this query. Even I spotted the same thing but I don't have any control on it.
3. I checked the health of indexes involved using 'analyze index validate structure'. They are good.

Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Last but not least, if my_target_sql.sql is expected to return a large number of rows you may want to wrap it up on a count shell like...
select count(*) from(
--put your sql statement here
);
...after all you are looking for trace/execution plan, not for the actual output.

Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.