> -----Original Message----- > From: Khawaja Shams [mailto:[EMAIL PROTECTED] > Sent: Friday, January 13, 2006 2:44 PM > To: Tomcat Users List > Subject: Re: PreparedStatement w/ Connection Pooling > > Hello, > Benchmarking is precisely what I am trying to do. However, if I > prepare a statement every time I need to execute the > statement, it would not > be an accurate measurement of optimizations that > preparedStatements can > offer. In fact, this would probably be worse than just executing the > statement once and for all. This is why I am wondering if > this is possible
It would be pretty simple to get a prepared statement object and call it in a loop as many times as necessary to get a benchmark. > so I can test for performance before integrating this with > our solution. > PreparedStatement can POTENTIALLY offer a great deal of > optimizations, if > used PROPERLY. Lots of ifs. If the database supports it, if your application uses statements that would benefit a lot. Unless you are in a pretty tight loop, its probably not going tomater. If it really helps your database. > Also, from what I have read so far, pre compiled > statements do a very > nice job of preventing SQL Injections. I am certainly open to hearing > better suggestions from you. Although you sound like a > manager, kindly note > that I am not your employee. I'm quite certain you are not my employee as well. I am a developer (professional for something like 15 years now). I have managed a lot of projects. George Sexton MH Software, Inc. http://www.mhsoftware.com/ Voice: 303 438 9585 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]