title: PHP writing 800 records to file(.txt) from database
body: <p>I am trying to access records from database more than 8000 with 30 columns and write to text file separated by tab.
  My php code is :</p>
  
  <pre><code> $fp1 = fopen( 'obspg.txt', 'w' );
    fwrite( $fp1,"RETSKU\tProduct Title\tDetailed Description\tProduct Condition\tSelling Price\tAvailability\tProduct URL\tImage URL\tManufacturer Part Number\tManufacturer Name\tCategorization\tGender\tsize\tColor\n");
    //retrive records from database and write to file
    $result = mysqli_query($con,"SELECT * FROM `TABLE 1` ");
    while($row = mysqli_fetch_array($result))
    {
       fwrite($fp1,$row[`id`]."\t".$row[`title`]."\t".  $row[`description`]."\t".$row[`condition`]."\t". $row[`price`]."\t".$row[`availability`]."\t".$row[`link`]."\t". $row[`image_link`]."\t".$row[`mpn`]."\t".$row[`brand`]."\t".$row[`google_product_category`]."\t".$row[`Gender`]."\t".$row[`size`]."\t".$row[`Color`]."\n");
    } 
    fclose( $fp1 );
  </code></pre>
  
  <p>But it taking too long time to execute.How I can improve performance of code? I can not utilize more than 25% usage on my server.  </p>