Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Prepared Statement vs statement

 
satishbsk kumar
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How Prepared statement differ statement ,while passing different values in where condition
Regards,
Satish
 
Jan Cumps
Bartender
Posts: 2608
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A database can recognize that a PreparedStatement with different values is the same query, and does not have to recompile / buikd execution plan.

A database will consider a Statement with different values as a different query, and will recompile it, and re-determine the execution plan.

(hope I did not make your homework)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic