title: mysql resultset is very slow in php output
body: <p>I have a query with 4000 rows in a resultset. If i execute this query in a query browser like Heidisql i get all 4000 lines in 0.5 seconds. If i make a <code>print_r($result);</code>  to view inside my Internet Browser, i get all datas in 30 seconds. That is a big difference!
  I have tried with mysqli and PDO it is the same problem.
  It is a simple query from twotable (with a left join) with 18 columns.
  I have a where in my query and all criterias are indexed (2 index!)
  I have a mysql 5.1 with a php 5.3</p>
  
  <p>Here the code:</p>
  
  <pre><code>$db_handle-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  $db_handle-&gt;setAttribute(PDO::ATTR_AUTOCOMMIT, false);
  $time_start = microtime(true);
  
  $sqlCFf = "
  SELECT ....
  ";
  $result_set = $db_handle-&gt;query($sqlCFf);
  
  $result = $result_set -&gt; fetchAll();
  print_r ($result);
  
  $time_end = microtime(true);
  
  $time_res = $time_end - $time_start;
  </code></pre>
  
  <p>Here the result from EXPLAIN:</p>
  
  <pre><code>1   SIMPLE  f   range   center  center  20      51000   Using index condition; Using where; Using MRR
  1   SIMPLE  g   ref compte  compte  62  func    1   Using where
  </code></pre>
  
  <p>if somebody has an idea to figure out more fast the output in PHP?</p>
  
  <p>THX in advance</p>