title: How to increase the fetching speed of data from Oracle using PHP
body: <p>I am developing a website which is fetching data from Oracle database on another server. But the problem is that database contains more than 50 million records and more than 10 records are added to the database every second. When I use following code to fetch records it took around 3-4 minutes to load the page :</p>
  
  <pre><code>&lt;?php
      $qry="SELECT col1, col2, col3 FROM table1 where col1=parameter1";
      $stid = oci_parse($db_con, $qry);
      oci_execute($stid);
      $r = oci_fetch_all($stid, $result, 0, -1, OCI_FETCHSTATEMENT_BY_ROW); //**** PROBLEM
      oci_free_statement($stid);
  ?&gt;
  </code></pre>
  
  <p>The marked line takes a huge lot of time to load the data. I have also tried foreach loop with oci_fetch_assoc() function but same problem. I have used PDO also but speed is same. This query retrieves almost 100 records.</p>
  
  <p>How can I speed up the page?</p>
  
  <p>I am free to use any other technology with PHP..</p>