• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

preparedstatements

 
vara prakash
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when we create the prepared statement, is the precompiled sql statement is getting saved at the database server side or at the JVM side. Could someone explain clearly what is happening under the covers.

TIA
Vara Prakash
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
 
vara prakash
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Thanks for reply but I could n't find the information I m looking for. Could you just explain me in detail.

Thanks in advance.
Vara Prakash
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll find a number of conversations if you search this forum, but basically the PreparedStatement should be cached in the database - or rather the database compiles the statement into database specific code and holds that. Some databases don't support PreparedStatements and the Driver fakes support, so in this case it is like caching in the JVM, but there isn't much benefit in this case except in the 'convenience' aspects PreparedStatements provide.

Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic