This is off-topic to this list. A quick answer is that it depends on your database how many times you can "re-use" a connection object. In JMeter's JDBC testing, you can specify how many times the connection pool allows each connection to be reused. Thus, you can test the difference in performance between reusing a connection only once, or reusing it 1000 times before re-initializing it. Just as an example, with MySQL, I have found that re-using connections more than 50 times starts to degrade performance slightly. Recreating connections to MySQL is so fast, that it's better to re-initialize your connections frequently rather than use old ones. I'm sure other databases are quite different.
-Mike On 20 May 2002 at 10:24, Johnson, Russ A wrote: > I have a design question. > > I have a multi-threaded servlet and that executes a number of sql > statements. I am re-using the same connection object for each of the sql > statements. Should I have a separate connection object for each sql > statement? I am using a connection pooling object. > > Thanks > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > -- Michael Stover [EMAIL PROTECTED] Yahoo IM: mstover_ya ICQ: 152975688 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

