After I hit the 'optimize SQL at Caret' button, the sql alternatives are generated but are not executed. Example of SQL that will not execute:
SELECT DISTINCT t1.PURCHASE_PLAN_ID
FROM SIT_PURCHASE_PLAN_VERSION t1
WHERE EXISTS
(SELECT 1
FROM SIT_PURCHASE_PLAN_GROUP t11,
SIT_PURCHASEPLAN_GROUP_PROD t12
WHERE t1.PURCHASE_PLAN_VERSION =
t11.PURCHASE_PLAN_VERSION
AND t1.PURCHASE_PLAN_ID = t11.PURCHASE_PLAN_ID
AND t11.GROUP_ID = t12.GROUP_ID
AND t12.PRODUCT_ID = :1)
AND t1.STATE = :2
WORKAROUND
Replace the bind variables with actual values before running the optimize.
STATUS
Waiting for fix in a future release of Toad for Oracle