Sebastian Mendel wrote: >> Gustav Wiberg wrote: >>> Hi there! >>> >>> I have a script that runs about 10 minutes... Localy on my computer >>> (Windows XP 2.6Ghz, Apache) the computer hangs a little now and then >>> when the script is running. Is there any good way of releasing more >>> memory while the script is running? The script could take 20 minutes, >>> it's not a big matter how long the script takes. (As long as the server >>> can do other things at the same time) >> >> why do you expect this comes from memory-consumption? >> >> did you check your Querys? try 'EXPLAIN SELECT ...' and check your indices >> >> how large are your tables? > > Hi Sebastian! > > The table are about 600-700 rows, but i only select 25 rows at a time, so I > guess that isn't the issue. > For each row, a comparison is done with a textfile that has almost 30.000 > rows. I guess this is the problem is... It takes time to load same textfile > for each row, but an array for 30.000 rows should not be done either or > should it? Is there a better way of solving this? > > The script loads after 25 rows, because of I don't want to get any timeout... > We don't have any own webserver, so we have to rely on our Webhotel-supplier. > And our webhotel doesn't wan't to change certain thing for security reasons.
why not move the text-file into the DB? of course not as a whole. or why not elsewise take 25 lines from the textfile against the 700 rows in the DB? or not load the whole file in the array, check line by line -> http://www.php.net/fgets -- Sebastian Mendel www.sebastianmendel.de www.sf.net/projects/phpdatetime | www.sf.net/projects/phptimesheet -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php