title: jMeter "Prepared SELECT Statement" - does it substitute bind variables?
body: <p>I am using jMeter to load test a SAP HANA database using a JDBC request that issues a SELECT statement using a "Prepared SELECT Statement" query type.</p>
  
  <pre><code>select * from accounts where acc = '${__P(acct),)} order by ts LIMIT 10
  </code></pre>
  
  <p>It is reading from a table with tens of billions of records, and I expect a throughput of several thousand transactions per second.
  The "acct" is a unique PK that is read in from a CSV using a CSV Data Set Config, substituted using a BeanShell Listener. </p>
  
  <p>The SQL statement in the database cache contains statements such as </p>
  
  <pre><code>select * from accounts where acc = 110982 order by ts LIMIT 10
  </code></pre>
  
  <p>This is a problem because the database has to parse each statement and it is a high CPU overhead. Using a "Prepared SELECT Statement" I had expect to see something like this:</p>
  
  <pre><code>select * from accounts where acc = :acc order by ts LIMIT 10
  </code></pre>
  
  <p>Where the statement is prepared and a value substituted at runtime, avoiding re-parsing. </p>
  
  <p>The jMeter documentation is mute on the subject so does a JDBC query type of "Prepared SELECT Statement" substitute literals for bind variables? </p>