Reply to Re: Efficiency of file vs database

Your name:

Reply:


Posted by Peter Fox on 12/18/06 11:20

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
peterfox@eminent.demon.co.uk.not.this.bit.no.html
2 Tees Close, Witham, Essex.
Gravity beer in Essex <http://www.eminent.demon.co.uk>

[Back to original 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

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