same sql is good in one database and behave slow in another databases which are same version
Please find the sql and their plan in 2 databases.same sql is fine in one database that is USTRUD42 and same sql is bad in database USTRQD42.Please find their plans and suggest me what can i do?
Both databases are on 11.1 version and please let me know on this.
sql which is runing bad in one database.
========================================
USTRUD42-NEW (Virtual RAC)
_______________
set autotrace traceonly explain
SELECT NVL(B.BOOKING_AT, 0), B.ACCOUNTING_CODE_ID, B.ORIGINAL_CURRENCY_ID
FROM IL_ITEM B, AJ_TEMP_TREATY D
WHERE B.FIRM_ID = D.FIRM_ID
AND D.FIRM_ID = 1
AND B.BUSINESS_TYPE_ID = D.BUSINESS_TYPE_ID