Welcome Guest, Not a member yet? Register   Sign In
Exceeded excution time
#1

[eluser]belial.seed[/eluser]
Hi i´m having trouble generating a file out of a big resultset, i´ll explain the problem, the code i´m using works for queries that return around 5000 rows and it´s really fast, however when i try the same thing with a bigger resultset (about 4 million rows with 10 fields each), seems like i run out of time so i´ve set max_execution_time=300 on my php.ini, i´ve tried to limit the resultset to half a million, but I still have the same problem, so a little light on my way will be appreciated, thanks for your attention.

the code i´m using:
Code:
$this->load->dbutil();
$this->load->library('zip');
$query = $this->gic_inventario->inventarios2($tmp01,$tmp02,$tmp03);
$delimiter = "\t";
$newline = "\r\n";
$datosArchivo=$this->dbutil->csv_from_result($query,$delimiter,$newline);
$nombreArchivo=date("Ymd_G-i").'_file.txt';
$rutaArchivo='./aplicacion/tmp/files/';
$this->zip->add_data($nombreArchivo, $datosArchivo);
$this->zip->archive('./aplicacion/tmp/files/'.
                             date("Ymd_G-i").'_file.zip');
$this->zip->download(date("Ymd_G-i").'_file.zip');

PS the query takes about 2 minutes to complete.


Messages In This Thread
Exceeded excution time - by El Forum - 08-27-2010, 03:52 PM
Exceeded excution time - by El Forum - 08-27-2010, 05:54 PM
Exceeded excution time - by El Forum - 08-31-2010, 12:55 PM
Exceeded excution time - by El Forum - 08-31-2010, 01:00 PM
Exceeded excution time - by El Forum - 09-01-2010, 12:19 AM
Exceeded excution time - by El Forum - 09-01-2010, 11:46 AM
Exceeded excution time - by El Forum - 09-03-2010, 04:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB