Forum Stats

  • 3,875,419 Users
  • 2,266,914 Discussions
  • 7,912,203 Comments

Discussions

ORA-13780 when running SQL tuning advisor, and solution

User51642 Yong Huang
User51642 Yong Huang Member Posts: 177 Bronze Badge

Searching for "ORA-13780: SQL statement does not exist" when running SQL tuning advisor I found

But the thread has been closed so I can't post a comment there. In addition to what the response said in the thread, I want to add that if you can reproduce the execution plan for the SQL, you can run the tuning advisor. So, get the SQL text and try to run it in sqlplus or any tool. If there're bind variables, substitute actual values (you may find them in v$sql_bind_capture). The SQL you run doesn't have to be exactly the same as the one you can't run tuning advisor on. As long as the hash value of the plan for your SQL matches that for the SQL you can't get advisor info on (you can get its hash value from v$sqlarea or v$sqlstats, the latter retaining info longer), then you run the SQL tuning advisor on the SQL you just ran. If you're advised e.g. creating an index, do so and both SQLs (your sqlplus SQL and the one you can't get advisor info on) will benefit.