Online Tutorials & Training Materials |
Register Login

How to Check What Execution Plan the Query Used Yesterday or Some days Back?

Sugandh || 17 Sep 2015 11:57 am || 2

Hello Experts,

Today I had an issue for slow running query for one of our warehouse database, where tables and indexes has latest stats yesterday no new data load, "dbms_xplan.display_awr" lists multiple explain plans and the query is using a same plan generated sometime back on 2014, however a latest plan also do exists which was generated on Aug/2015. Query was same with no change.

The same query ran fine yesterday but slow today. Is any one aware if we do have any option like how to check what execution plan the query used yesterday or since some days back ?

Kindly share your views here, thanks in advance.


  • 17 Sep 2015 11:59 am Helpful Answer

    Find out SQL id fo that query and using the query to find out query plan with timings, select SQL_ID,PLAN_HASH_VALUE, OPERATION, COST, TIMESTAMP from DBA_HIST_SQL_PLAN where SQL_ID='g9ks2772vgzdy'


  • 17 Sep 2015 12:00 pm Helpful Answer

    Check the data volume processed by the query. As you are saying plan is same then response time can change due to change in data volume.