Hello EveryOne,

My Objective is to generate CSV file of my query output.
if my table have 1 Lakh record...
i am using this way
open(CSV, "> file.csv"); 
$sth = $dbh->prepare('SELECT * FROM exmpl_tbl '); 
while($result = $sth->fetchrow_hashref()) { 
  print CSV  "$result->{id} , $result->{val} \n"; 
This way is not optimize way to generate CSV...
how to generate CSV for 1 lakh record or more in fast way....

so please suggest me .....