Oracle Error ORA-29387: no top-plans found in the pending area

Oracle Error Message

ORA-29387: no top-plans found in the pending area

Reason for the Error

The VALIDATE_PENDING_AREA procedure found that either the intended top-plan(s) are involved in a loop or there are no top-plans.

Solution

Check all edges going from a subplan to the intended top-plan. Make sure the top plan does not have any plan referring to it.