Reparse a query
A reader, November 01, 2019 - 6:01 am UTC
Is there a way to force the query to change its execution plan mid-way >> Don't think that is possible
While gathering stats you can also use NO_INVALIDATE=>FALSE (that is TRUE by default)
Cheers
November 05, 2019 - 4:12 am UTC
True, but you then do run the risk of creating a parse storm (dependent on your application)
Another possibility...
J. Laurindo Chiappa, November 01, 2019 - 12:16 pm UTC
Adaptive plans may work
Divines, December 15, 2020 - 5:20 pm UTC
Adaptive plans do work sometime, which is a very good feature. I am looking at something with which I can force a query to be run again fresh without killing the existing session and running the process again.
Say stats were missing, query went slow ... I gathered stats but do not want to restart the process. Just that Oracle creates an execution plan again and runs it again(which would be hopefully better than the one with no or bad stats).
Best regards!!
December 17, 2020 - 4:42 am UTC
Same - use DBMS_SHARED_POOL to purge that cursor.