What about the SAVE portion of the questiuon
J. Laurindo Chiappa, March 20, 2018 - 3:34 pm UTC
Yes, we can extract the execution plan via DBMS_XPLAN, right : but how we can to SAVE this execution plan in a table ?? And (of course) the database in point is STANDARD EDITION so we can´t get the execution plan from AWR, use SQL Monitoring, create a SQL baseline with the execution plan or things like that...
March 21, 2018 - 10:37 am UTC
Sorry, missed that.
You can run statspack with level >= 6. Note this only captures plans that are in the shared pool for queries exceeding one of the SQL thresholds.
Statspack can be an option...
J. Laurindo Chiappa, March 21, 2018 - 11:53 am UTC
Will try it : statspack iirc is deprecated so much probably it will not save all the extended plan statistics/details (such as A-ROWS/A-TIME/E-ROWS/E-TIME, OMem/1Mem/Used-Mem, etc), but I will try - if so, I will use a manual insert from v$sql/sql_plan/sql_plan_staqtistics_all and later will erite a query to assmeble the execution plan from that..
Regards,
Chiappa