T
Tim Smith
I noticed some performance degradation on a section of my code and I
narrowed it down to calling Oracle for a sequence, which was executed
20 times or so.
Our current design we pull a connection from the pool (as opposed to
holding open a connection for the duration of that code) with each SQL
execution.
Writing a test program which loops 900 times, executing 'select
sequence_name.nextval from dual', using ODP net I see the following
average execution times
Connection from pool each select: 20 milliseconds
Hold connection open entire time: 15 milliseconds.
20 milliseconds does not seem long, but when you have 20 sequences
needed - that is almost 1/2 a second lost.
Sure I could change the design, but my question is whether 20 ms is a
reasonable time for something, which executed in a tight loop should
be extremely fast?
thanks
Tim
narrowed it down to calling Oracle for a sequence, which was executed
20 times or so.
Our current design we pull a connection from the pool (as opposed to
holding open a connection for the duration of that code) with each SQL
execution.
Writing a test program which loops 900 times, executing 'select
sequence_name.nextval from dual', using ODP net I see the following
average execution times
Connection from pool each select: 20 milliseconds
Hold connection open entire time: 15 milliseconds.
20 milliseconds does not seem long, but when you have 20 sequences
needed - that is almost 1/2 a second lost.
Sure I could change the design, but my question is whether 20 ms is a
reasonable time for something, which executed in a tight loop should
be extremely fast?
thanks
Tim