title: How to properly test query performance
body: <p>I have a function that takes either an array of IDs or a singular ID as an argument.  If an array is passed, it is imploded on comma to make the IDs query friendly.</p>
  
  <p>There is a query inside this function that updates the records for the IDs that were passed.</p>
  
  <p>The query is as follows:</p>
  
  <pre><code>"UPDATE tbl_name SET enabled = 1 WHERE ID IN (" . $IDs . ")";
  </code></pre>
  
  <p>Now, I'm wondering if there's a performance issue with using tha above query for the array and something like:</p>
  
  <pre><code>"UPDATE tbl_name SET enabled = 1 WHERE ID = " . $IDs;
  </code></pre>
  
  <p>if only a single ID is passed.</p>
  
  <p>I tested both queries in the MySQL query browser for the same ID and got a performance of .02 seconds for both queries - a trivial difference in performance.</p>
  
  <p>Is simply testing the two in the query browser an ok way to check the optimal query performance?</p>
  
  <p>It's just that I don't want to pollute my code with two queries in the one function if it is not necessary.</p>