Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reg. PrepareStatement  RSS feed

 
Abrahim Daver
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As PrepareStatement keeps query pre-compiled... Is that pre-compiled query stored in database? Please clarify, if possible.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It should be, if your database supports this, since this provides a performance saving. Some databases don't, and as a result the driver will cache the PreparedStatements. If that's happening, the PreparedStatment will be being compiled everytime it is run.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!