CodeIgniter Forums
Problem with large records - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1)
+--- Forum: Regional User Groups (https://forum.codeigniter.com/forumdisplay.php?fid=25)
+--- Thread: Problem with large records (/showthread.php?tid=68976)



Problem with large records - Germanikus - 09-21-2017

Hello,
I'm just about to create a setup from my old database to the new database.
Now I have the problem and do not know where I can change that.
One of my tables has stored more than 9000 records and if I want to run it, I get an error message and that is in it.

Fatal error: Maximum execution time of 60 seconds exceeded in ....\test\system\database\drivers\mysqli\mysqli_driver.php on line 305

Can I change the 60 sec?


RE: Problem with large records - Wouter60 - 09-22-2017

PHP Code:
set_time_limit(300 //5 minutes 

I guess it's just a one time action, isn't it?
Why don't you export the tables from your current database to an .sql file and import it into your new database?
Not with CodeIgniter, but with the SQL management tool (most likely phpMyAdmin).


RE: Problem with large records - Abhi - 09-22-2017

(09-21-2017, 09:57 PM)Germanikus Wrote: Hello,
I'm just about to create a setup from my old database to the new database.
Now I have the problem and do not know where I can change that.
One of my tables has stored more than 9000 records and if I want to run it, I get an error message and that is in it.

Fatal error: Maximum execution time of 60 seconds exceeded in ....\test\system\database\drivers\mysqli\mysqli_driver.php on line 305

Can I change the 60 sec?

you can change maximum_execution_time : 2000 and maximum_input_time : 200 from php.ini


RE: Problem with large records - Germanikus - 09-22-2017

Where or how do I change this?


RE: Problem with large records - rtenny - 09-22-2017

the execution time can be changed in your php.ini
But running any script for longer then 60sec is not a good idea. If this is a one off make sure you change the setting back.


RE: Problem with large records - php_rocs - 09-22-2017

@Germanikus,
You might want to check your query because it should not take that long to pull that many records. Also, check to make sure that your table has a proper index. If you are able to...run your query with EXPLAIN (https://dev.mysql.com/doc/refman/5.7/en/explain.html ). This will help you figure out if your query is efficient. I'm assuming that you are using MySQL.