I have a long process that usually takes 1 hour, but it sometimes takes 3 times longer.
We set up a VirtualMachine with Windows 2008 R2 and Oracle 11g Release 11.2.0.1. No other user has access to this VM. Before each test we delete and recreate the Oracle instance with the data. In theory every single execution should take the same time.
About 20% of the time, it takes 3 hours instead of 1. I decided to enable logging with "set sqltrace = true" and then monitor for differences with "tkprof".
The output of a fast (1 hour) and a slow (3 hours) execution are identical, except for the summary at the bottom of the trace.
Here is the trace summary of the fast execution:
Here is the trace summary of the slow execution:Code:
1 session in tracefile
1711850 user SQL statements in trace file
67495 internal SQL statements in trace file
1779345 SQL statements in trace file
4196 unique SQL statements in trace file
13692028 lines in trace file
As you can see, with the same data processed, I see 3 sessions instead of one, and the total execution time is also 3 times longer. What does the "3 sessions" means, I was alone on the VM for every tests, there was no additionnal sessions running at the time.Code:
3 sessions in tracefile
5135559 SQL statements in trace file
202506 internal SQL statements in trace file
1779365 SQL statements in trace file
4200 unique SQL statements in trace file
13692482 lines in trace file