Why select from the mam_assets table twice for a.id?
Code:
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
Why select from the mam_assets table twice for a.id?
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.
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.