-
I would like to follow the performance of querys, and if some of them spend more then two hour and they could not finish yet I need to identify them and to kill.
This procedure will avoid process running all day long because has some error or a SQL code miswrited.
-
So what kind of solutions are you looking for?
Sam
-
For exemple I would like to run a SQL to see if there are some SQL running more then two hour so I could open the source and analyse the code to clean mistakes.
-
go to sqlplus do
set autotrace traceonly explain
look the explain plan and you can get an idea of how good/bad will your SQL run, no timing information because it's not that smart yet without running the query
-
A query running for two hours need not necessarily be bad.
What you probably need to do is, schedule a job that will collect running SQLs and do explain plan on them. Examine these plans to decide what is bad what is not.