Re: Limit SQL execution for specific SQL IDs
Narendra, July 09, 2025 - 4:20 pm UTC
Thank you Chris for your response.
Unfortunately it is a packaged application so no option of using module/action without a change. Also my case is about SQL ID using same execution plan but having different response times due to skew in underlying data.
My intention is to find a way to limit/affect only long-running executions but allow other executions of a specific SQL ID (with specific execution plan) without making changes to application code, if there exists one (something like what sql patch/sql profile/sql plan baselines do)
Thanks in advance
July 09, 2025 - 4:35 pm UTC
How slow does the query get compared to other queries where it's expected and OK for them to run for a long time? i.e. can you set a blanket query limit for the app using Resource Manager without impacting reporting or other long-running queries?
If not, I'm not aware of other out-of-the-box methods. You could roll your own by having a job that checks v$session for sessions that have been running this SQL id for some time and run alter system cancel SQL on them.
To Narendra
J. Laurindo Chiappa, July 09, 2025 - 6:37 pm UTC