title: Should I always prefer working with prepared SQL statements, for performance benefits?
body: <p>My understanding is that a <em>prepared statement</em> is compiled on the server once, thus saving the overhead of repeating parsing, optimization etc. Apparently, I should always prefer using prepared statements for queries that run more than once.</p>
  <p>Are there any cons to this approach?</p>
  <p>I am using <a href="https://en.wikipedia.org/wiki/Open_Database_Connectivity" rel="nofollow noreferrer">ODBC</a> (libodbc++) from C++ to MySQL.</p>