I have PL / SQL code that I think may have a memory leak. Every time I run it, it runs slower and slower than before, although now I am reducing the size of the input. The code I suspect is populating an array from a cursor using massive collection, something like this
open c_myCursor(in_key);
fetch c_myCursor bulk collect into io_Array;
close c_myCursor;
I'm not sure how to check what causes this slowdown. I know that there are several tables in Oracle that track the use of this type of memory, but I'm not sure if you can look at these tables and find your way to something useful in what my code does.
In addition, I tried to withdraw the session and return to it after 10-15 minutes, still very slowly.
Oracle Version - 10.2
So, it turns out that there was a different database activity. The database administrator decided to run several large tasks for inserting and updating at about the same time as he began to change and test the code. I suspected that my code was the main reason because I was not told about other work being done (and I only heard about this other work after it completely froze everything and all the other developers got angry). This is probably why my code is getting slower and slower.
Is there a way to find this programmatically, for example, requesting a session by inserting / updating a lot of data, in case the database administrator forgets to tell me the next time he does it?
source
share