Long running JDBC session
Hello, I have a servlet that connects to an Oracle database (9i) using classes12.jar JDBC file. In it, there´s a loop that executes a quick query 3000 times, and that´s running for long 10 minutes !! Is there any way I can optimize this connection (JDBC parameters maybe) for such case ? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Long running JDBC session
This is really not a Tomcat question. Are you using connection pooling? If so which one? How many connections? Why are you not using the latest jar from oracle? You should download the 9i driver. What is your code for how you obtain connection and how you create statements. Are you using PreparedStatements? Nathan On May 4, 2004, at 2:31 PM, Carlos-Roberto Queiroz wrote: Hello, I have a servlet that connects to an Oracle database (9i) using classes12.jar JDBC file. In it, there´s a loop that executes a quick query 3000 times, and that´s running for long 10 minutes !! Is there any way I can optimize this connection (JDBC parameters maybe) for such case ? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Long running JDBC session
Sorry, I sent the message to the wrong group. :P Nathan Maves [EMAIL PROTECTED]To: Tomcat Users List [EMAIL PROTECTED] .COMcc: Subject: Re: Long running JDBC session 04/05/2004 05:33 PM Please respond to Tomcat Users List This is really not a Tomcat question. Are you using connection pooling? If so which one? How many connections? Why are you not using the latest jar from oracle? You should download the 9i driver. What is your code for how you obtain connection and how you create statements. Are you using PreparedStatements? Nathan On May 4, 2004, at 2:31 PM, Carlos-Roberto Queiroz wrote: Hello, I have a servlet that connects to an Oracle database (9i) using classes12.jar JDBC file. In it, there´s a loop that executes a quick query 3000 times, and that´s running for long 10 minutes !! Is there any way I can optimize this connection (JDBC parameters maybe) for such case ? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Long running JDBC session
You could try writing your queries so fewer are done. 3000 quick queries is 3000 command parses + 3000 actual query executions. That's a lot of work for the database engine. Fewer queries (1 if possible) would drastically increase performance. --David Carlos-Roberto Queiroz wrote: Hello, I have a servlet that connects to an Oracle database (9i) using classes12.jar JDBC file. In it, there´s a loop that executes a quick query 3000 times, and that´s running for long 10 minutes !! Is there any way I can optimize this connection (JDBC parameters maybe) for such case ? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Long running JDBC session
the 9i jdbc .jar drivers are named as follows: you can find them in a sub-directory of your Oracle9i rdbms ojdbc14.jar ocrs12.jar -paul. - Original Message - From: Nathan Maves [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 4:33 PM Subject: Re: Long running JDBC session This is really not a Tomcat question. Are you using connection pooling? If so which one? How many connections? Why are you not using the latest jar from oracle? You should download the 9i driver. What is your code for how you obtain connection and how you create statements. Are you using PreparedStatements? Nathan On May 4, 2004, at 2:31 PM, Carlos-Roberto Queiroz wrote: Hello, I have a servlet that connects to an Oracle database (9i) using classes12.jar JDBC file. In it, there´s a loop that executes a quick query 3000 times, and that´s running for long 10 minutes !! Is there any way I can optimize this connection (JDBC parameters maybe) for such case ? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]