You are here: Re: Efficiency of file vs database « PHP Programming Language « IT news, forums, messages
Re: Efficiency of file vs database

Posted by ircmaxell on 12/18/06 13:33

Well, the problem I have, is that durring the peak times, the server is
at its limit of resouces (CPU and Ram) and getting around 100 requests
per second (images included). So if I could save a tiny bit, it would
make a difference... Even at its peak, the script runs every 30
seconds, however if I could reduce the memory footprint created by this
program, it would reduce Apache's child process memory footprints...
Just a question... Thanks!

On Dec 18, 6:20 am, Peter Fox
<peter...@eminent.demon.co.uk.not.this.bit.no.html> wrote:
> Following on from ircmaxell's message. . .
>
> >Ok, I have a program that reads the contents of a file (1 line, 5 '|'
> >seperated items). Every so often (between twice a day, and 200 times a
> >day), it rewrites the contents of that file. I also do a few database
> >update queries whenever the file is written. I only open up the
> >database connector if I need to update the database. The script itself
> >runs every 30 seconds. My question, is that is it faster and more
> >efficient to read the file every time, or open the database connector
> >and make a query? The file name never changes, and I read the whole
> >file at one time (679 bites).Well since you have both methods at your disposal why don't you compare
> them? If you can't detect a speed difference then it doesn't matter.
>
> In my experience this sort of choice will probably depend on other
> things anyway.
>
> I have a feeling that you're making a mountain out of a molehill of
> machine cycles.
>
> --
> PETER FOX Not the same since the porcelain business went down the pan
> peter...@eminent.demon.co.uk.not.this.bit.no.html
> 2 Tees Close, Witham, Essex.
> Gravity beer in Essex <http://www.eminent.demon.co.uk>

 

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

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