title: PHP mysqli slow loading.
body: <p>Evening all! </p>
  
  <p>I'm optimizing my website, and I'm running into some peculiar behaviour.  Before, I assumed it was because of the calculations being done on the data I was using, but I'm starting to question this.  </p>
  
  <p>I find that running some code like: </p>
  
  <pre><code>for ($i=0; $i &lt; 55 ; $i++) { 
    $query = "SELECT id FROM gamedata_concepts WHERE game_id=12277";
  
    if ($result = $mysqli-&gt;query($query){
    }
  }
  </code></pre>
  
  <p>Takes about 3 seconds, however, if I call that query once in say, phpMyAdmin, it says it takes '.0121' seconds, multiply that by 55 (the testing number used above in the loop), and it SHOULD take appx. .6655 seconds.  I'm curious as to maybe where this backend is?  Or better, how I can engineer this better to be more efficient.  </p>
  
  <p>Thanks. </p>