[HELP] How to avoid time execution exceeded...
Moderator: General Moderators
[HELP] How to avoid time execution exceeded...
Hi, i got a DB with 10000 records and i've made a script that for each record check if a determinated value is present in other records of the same DB. Each record that match my search is stored in another table.
Te problem is that this script stops cause it reachs the time limit present in php.ini (i've tried to chage that value to 90 secs but the problem persist). The cycle for a single record take some sec, but all that secs for all record cause the timeout.
How can i do to solve this problem????
Thanks
FABIO
Te problem is that this script stops cause it reachs the time limit present in php.ini (i've tried to chage that value to 90 secs but the problem persist). The cycle for a single record take some sec, but all that secs for all record cause the timeout.
How can i do to solve this problem????
Thanks
FABIO
- Ollie Saunders
- DevNet Master
- Posts: 3179
- Joined: Tue May 24, 2005 6:01 pm
- Location: UK
10,000 records isn't that much and certainly shouldn't be taking that long. What exactly are you doing with it%AC
I'm not sure but you may be able to disable the max timeout.
I'm not sure but you may be able to disable the max timeout.
Code: Select all
ini_set('max_execution_time', false);i was thinking that i have to change something in my script, cause the check, and all operations if the check match or not, isn't only on 10.000 records, but for each one of the 10.000 i have to check the value in all other 9.999 records!! So in total the script generate 100.000.000 operations! So is normal that is go in timeout...
Any suggestion is very wellcome!!
Any suggestion is very wellcome!!
Not at all, cause the value that i compare is an address and i have to extract it from mysql than i do a while in all db and with a function a do the comparasion of the address with all other address. So i've thinckin that i've to review all my script....feyd wrote:Can you not have the database do the work for you?
cause they r manually insered i can have "main avenue, 23" and "main avanue 23" without comma, i can not use a stric comparation, so i used similar_text(), another function, made by me, to check the number present in both strings and link the compartion with other 2 values (the city and zip code) that are insered with a dropdown menu so i can use a stric comparation.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA