You are here: Re: Freing memory resources? « PHP « IT news, forums, messages
Re: Freing memory resources?

Posted by Sebastian Mendel on 06/16/05 14:49

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация