Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Jdbc > Does "preparing...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 1888 of 1998
Post > Topic >>

Does "preparing" a PreparedStatement really help?

by ptomblin@[EMAIL PROTECTED] (Paul Tomblin) Feb 23, 2008 at 11:25 AM

Is there a performance advantage for preparing a PreparedStatement and
keeping 
it around and using it thousands of times rather than making a new
Statement 
every time?  How big?

Back when I was doing Oracle Call Interface programming in C back in the
mid 
to late 1980s, we were always told that pre-parsing a query was very
expensive 
and so you tried not to do it very often, and once you'd done it, you
stored 
them to reuse.  As I try to switch this system over to using a connection 
pool, trying to store PreparedStatements for each connection is fairly 
complicated and I'm wondering if it's worth it.


-- 
Paul Tomblin <ptomblin@[EMAIL PROTECTED]
> http://blog.xcski.com/
I wouldn't be surprised if I'd have to put garlic in the CD drawer
to really get rid of it.
               -- Arthur van der Harg on 'Gator'

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match
 




 4 Posts in Topic:
Does "preparing" a PreparedStatement really help?
ptomblin@[EMAIL PROTECTED  2008-02-23 11:25:58 
Re: Does "preparing" a PreparedStatement really help?
pg@[EMAIL PROTECTED] (Da  2008-02-23 13:14:58 
Re: Does "preparing" a PreparedStatement really help?
heikki@[EMAIL PROTECTED]   2008-02-23 19:17:19 
Re: Does "preparing" a PreparedStatement really help?
mljv@[EMAIL PROTECTED]   2008-02-24 13:50:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 13:39:22 CDT 2008.